-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling Uphold's CDD (customer due diligence) process. #11857
Handling Uphold's CDD (customer due diligence) process. #11857
Conversation
A Storybook has been deployed to preview UI for the latest push |
A Storybook has been deployed to preview UI for the latest push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we should just make sure to create an issue for the Android piece of this.
case 'upholdCustomerDueDiligenceRequiredModal': | ||
return ( | ||
<ModalRedirect | ||
id={'redirect-modal-uphold-customer-due-diligence-required'} | ||
errorText={getLocale('redirectModalUpholdCustomerDueDiligenceRequiredText')} | ||
titleText={getLocale('redirectModalUpholdCustomerDueDiligenceRequiredTitle')} | ||
learnMore={'https://wallet.uphold.com/customer-due-diligence'} | ||
buttonText={getLocale('redirectModalClose')} | ||
walletType={walletType} | ||
onClick={this.actions.hideRedirectModal} | ||
/> | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we mentioned this in the meeting today, but any changes made to components/brave_rewards/resources/page
should be made to components/brave_rewards/resources/android_page
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, just pushed them.
@emerick Would you mind helping me with testing this on Android? I don't have an Android device at hand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, ping me whenever you're ready!
if (action.payload.result === 43) { // type::Result::UPHOLD_CUSTOMER_DUE_DILIGENCE_REQUIRED | ||
state.ui.modalRedirect = 'upholdCustomerDueDiligenceRequiredModal' | ||
break | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above.
f00eb56
to
b99a8a8
Compare
A Storybook has been deployed to preview UI for the latest push |
- introducing `upholdCustomerDueDiligenceRequiredModal` that tells the user to complete the CDD survey on Uphold - parsing out `verifications.customerDueDiligence.status` from the response of `GET https://api.uphold.com/v0/me` - sending the user to `NOT_CONNECTED`/`DISCONNECTED_VERIFIED` if CDD is required for them - and showing `upholdCustomerDueDiligenceRequiredModal` (and `kWalletDisconnected` if already VERIFIED) - adding test cases
b99a8a8
to
4c3c01b
Compare
A Storybook has been deployed to preview UI for the latest push |
|
Verified with
Scenario 1: Clean install - PENDING ==> NOT_CONNECTED - PASSEDPre-req: Use Charles Proxy to simulate CDD required or ask for your Uphold sandbox account to be put into this state.
Scenario 2: Upgrade - VERIFIED ==> DISCONNECTED_VERIFIED (brave://rewards tab active) - PASSEDPre-req: Use Charles Proxy to simulate CDD required or ask for your Uphold sandbox account to be put into this state.
Scenario 3: Upgrade - VERIFIED ==> DISCONNECTED_VERIFIED (brave://rewards tab not active) - PASSEDPre-req: Use Charles Proxy to simulate CDD required or ask for your Uphold sandbox account to be put into this state.
Encountered brave/brave-browser#20529 while testing scenario 3 Verified with Note - the "Disconnected" panel notification is not implemented on Android, see brave/brave-browser#20603 Scenario 1: Clean install - PENDING ==> NOT_CONNECTED - PASSEDPre-req: Use Charles Proxy to simulate CDD required or ask for your Uphold sandbox account to be put into this state.
Scenario 2: Upgrade - VERIFIED ==> DISCONNECTED_VERIFIED (brave://rewards tab active) - PASSEDPre-req: Use Charles Proxy to simulate CDD required or ask for your Uphold sandbox account to be put into this state.
Note - different UI on settings page and panel for disconnected state is logged and will be handled separately, known issue not related to this PR.
Scenario 3: Upgrade - VERIFIED ==> DISCONNECTED_VERIFIED (brave://rewards tab not active) - PASSEDPre-req: Use Charles Proxy to simulate CDD required or ask for your Uphold sandbox account to be put into this state.
Encountered brave/brave-browser#20529 (comment) while testing scenario 3 |
Resolves brave/brave-browser#20427, resolves brave/brave-browser#20497.
upholdCustomerDueDiligenceRequiredModal
) that tells the user to complete the CDD survey on Upholdverifications.customerDueDiligence.status
from the response ofGET https://api.uphold.com/v0/me
NOT_CONNECTED
/DISCONNECTED_VERIFIED
if CDD is required for themupholdCustomerDueDiligenceRequiredModal
(and thekWalletDisconnected
notification, if they're alreadyVERIFIED
)upholdCustomerDueDiligenceRequiredModal
:Learn More
links tohttps://wallet.uphold.com/customer-due-diligence
.Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
These tests need an Uphold account that requires CDD.
Testing linkage:
PENDING
==>
NOT_CONNECTED
(during linking attempt): only modal – no notification (since they haven't been verified)linking_attempt.mp4
Upgrade tests:
Make sure you're on
brave://rewards
when upgrading to the new version!VERIFIED
==>
DISCONNECTED_VERIFIED
(onRewards
page): modal + notificationrewards_page.mp4
Make sure you're not on
brave://rewards
when upgrading to the new version!VERIFIED
==>
DISCONNECTED_VERIFIED
(onRewards
panel): only notification – no modal (since they're not onRewards
page)rewards_panel.mp4
As far as the spinner issue, see brave/brave-browser#20529.
Android doesn't have the
wallet_disconnected
notification (ExternalWalletDisconnectedNotification
) implemented, see brave/brave-browser#20603.