-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Handle Wallet Onfido flow #8093
Conversation
2540370
to
bb6defc
Compare
0b9f587
to
42459e3
Compare
169efc5
to
94bb792
Compare
Friendly Bump @marcaaron @ctkochan22 and @francoisl for review |
@@ -212,7 +215,12 @@ function activateWallet(currentStep, parameters) { | |||
|
|||
if (response.jsonCode !== 200) { | |||
if (currentStep === CONST.WALLET.STEP.ONFIDO) { | |||
Onyx.merge(ONYXKEYS.WALLET_ONFIDO, {error: response.message, loading: false}); | |||
Onyx.merge(ONYXKEYS.WALLET_ONFIDO, {loading: false}); | |||
if (response.title === CONST.WALLET.ERROR.ONFIDO_FIXABLE_ERROR) { |
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.
Can we use the UUID or any type of error code for this instead? As it stands, the error message sounds more likely to change in Web-Secure and break this flow.
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.
It's the pattern we've been using everywhere else in this method. I agree with you, although I'm not a fan of using the uuid either.
I think the proper way would be either via another type of exception php (extending from ExpError), or via a key errorType
in data? (Either way, let's do it in a follow up PR, so I can do it for all the other places too).
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.
Would be good to try to start a wider conversation about this and propose a holistic fix. There's a lot of inconsistency in the new app in general WRT error handling - in many places we look at jsonCode
in others the response.message
etc.
src/languages/en.js
Outdated
@@ -567,6 +567,12 @@ export default { | |||
genericError: 'There was an error while processing this step. Please try again.', | |||
cameraPermissionsNotGranted: 'Camera permissions not granted', | |||
cameraRequestMessage: 'You have not granted us camera access. We need access to complete verification.', | |||
originalDocumentNeeded: 'Please upload an original image of your ID rather than a screenshot or scanned image.', | |||
documentNeedsBetterQuality: 'Your ID appears to be damaged or has missing security features. Please upload an original image of your undamaged ID that is entirely visible.', |
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.
nab but if their ID is damaged, how can the user upload an "image of [their] undamaged ID"? Would it make more sense to say: Please upload an original image of an undamaged ID ...
?
src/libs/actions/PersonalDetails.js
Outdated
* @param {String} login | ||
* @param {String} displayName | ||
* @param {String} firstName | ||
* @param {String} lastName |
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 can't really tell if we have a standard for this but looking at other functions like here or here, shouldn't be params be written:
* @param {String} login | |
* @param {String} displayName | |
* @param {String} firstName | |
* @param {String} lastName | |
* @param {Object} params | |
* @param {String} params.login | |
* @param {String} params.displayName | |
* @param {String} params.firstName | |
* @param {String} params.lastName |
?
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.
Maybe would also clearer to use a @param {Object} personalDetail
. Seems this method is intended to be called with a row from personalDetails
key in storage, but I wasn't sure on first glance.
src/libs/actions/PersonalDetails.js
Outdated
* @param {String} login | ||
* @param {String} displayName | ||
* @param {String} firstName | ||
* @param {String} lastName |
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.
Maybe would also clearer to use a @param {Object} personalDetail
. Seems this method is intended to be called with a row from personalDetails
key in storage, but I wasn't sure on first glance.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Hi @nkuoch, could you please let us know if there is an easy way to get to this screen in order to test it from the accessibility perspective? Can we use any testing account to get to it? Thanks! |
Tested with https://github.com/Expensify/Web-Secure/pull/2174
Details
Handle Onfido flow in P2P wallet activation
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/191962
Tests
Tests can be found in https://github.com/Expensify/Web-Secure/pull/2182
QA Steps
None
Screenshots
Web