Update "Additional details" form in KYC wallet upgrade flow#6752
Conversation
add FormScrollView component to DRY things up Fix up Additional Details step in wallet flow undo bad change
|
|
||
| const newErrors = lodashCloneDeep(errors); | ||
| lodashUnset(newErrors, fieldName); | ||
| Wallet.setAdditionalDetailsErrors(newErrors); |
There was a problem hiding this comment.
I thought about maybe taking the time to abstract some of the logic out of ReimbursementAccountUtils to reuse here, but decided not to since this will all be replaced eventually by our new forms system whenever it is ready.
App/src/libs/ReimbursementAccountUtils.js
Lines 32 to 43 in 9f2b4f0
I will create a follow up to address this if it looks like the forms project will take a long time.
nickmurray47
left a comment
There was a problem hiding this comment.
Code looks good to me! Had a couple basic comments to add
|
|
||
| setAdditionalDetailsLoading(true); | ||
| setAdditionalDetailsErrors(null); | ||
| setAdditionalDetailsErrorMessage(); |
There was a problem hiding this comment.
Even though the default argument is set to '', I think it'd be clearer here to have setAdditionalDetailsErrorMessage('') to make it more obvious that we are clearing the error message. Otherwise, I'm thinking that some other message is getting set.
Thoughts?
There was a problem hiding this comment.
Sure I can get behind that reasoning.
| WALLET_ADDITIONAL_DETAILS: 'walletAdditionalDetails', | ||
|
|
||
| // Stores values put into the additional details step of the wallet KYC flow | ||
| WALLET_ADDITIONAL_DETAILS_DRAFT: 'walletAdditionalDetailsDraft', |
There was a problem hiding this comment.
A little bit confused by this key name, why DRAFT over something like WALLET_ADDITIONAL_DETAILS_KYC
There was a problem hiding this comment.
Is it a DRAFT because the user might not finish but will need to come back to it?
There was a problem hiding this comment.
I'm following the pattern we initially set up here:
Lines 133 to 134 in 1c80150
And yeah they are drafts since if the user bails on the flow and returns later they can pick up where they left off.
There was a problem hiding this comment.
This hopefully will be a detail of all forms eventually but for now we have to store it somewhere.
| // object with field names as keys and boolean for values | ||
| const errorFields = _.reduce(response.data.fieldNames, (errors, fieldName) => ({ | ||
| ...errors, | ||
| [fieldName]: true, |
There was a problem hiding this comment.
+1 like the change to booleans for values, will keep this refactor in mind
| onFixTheErrorsLinkPressed={() => { | ||
| this.form.scrollTo({y: 0, animated: true}); | ||
| }} |
|
Updated! |
|
Triggered auto assignment to @marcaaron ( |
|
@nickmurray47 looks like this was merged without passing tests. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
This doesn't look right to me, going to remove the |
|
Ya I think this is a bug and this did pass all the tests. |
|
🚀 Deployed to staging by @nickmurray47 in version: 1.1.20-3 🚀
|
|
I tried to verify this to unblock the deploy checklist, but unfortunately I'm blocked by this bug in the Onfido flow for Android mWeb 😞 |
|
Ah thanks @Julesssss! I think we can check this off if everything else is working - nobody should be triggering the KYC flow in product yet and we're going to need to E2E test the entire flow on all platforms eventually. |
|
Ah that's great, thanks for confirming 👍 |
|
🚀 Deployed to production by @Julesssss in version: 1.1.21-1 🚀
|
Details
Improves the "Additional details" step of the KYC Wallet Upgrade flow so it behaves like the VBA.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/188531
Tests
QA Steps
Internal QA - perform tests above with a new account on the "Send Money" beta
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android