-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Incorporate Add Bank Account / KYC checks into Send Money + Pay request flow #6659
Conversation
I'm at an interesting spot with this stuff. A few things are becoming clear...
I'm unsure the best way to achieve the "continue" logic just yet, but have a few of ideas...
|
Solution |
Found a better solution than everything else that I thought of which is to create a "pay wall" type component where if the user has not completed checks or added payment method we force them to complete the flow and then "continue" whatever the original action is after. The component uses a ref similar to how the |
This is on HOLD still but taking off draft to get some initial thoughts on the overall implementation etc. |
No, you must add a bank account or debit card in order to do any of these things otherwise you can't pay with the wallet. |
cool, just wanted to make sure |
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.
👍 will leave to you @danieldoglas
I'm reviewing and testing this. Not really used to this flow so taking some time. |
Gonna also do some quick tests on the platforms. Just realized this is adding new UI and so should be tested everywhere and have screenshots. |
@danieldoglas please let me know if there are any questions! |
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.
Leaving this as a comment so we can discuss my two comments before approving, but overall LGTM
{ | ||
Component: AddPersonalBankAccountPage, | ||
name: 'IOU_Send_Add_Bank_Account', | ||
}, | ||
{ | ||
Component: AddDebitCardPage, | ||
name: 'IOU_Send_Add_Debit_Card', | ||
}, | ||
{ | ||
Component: EnablePaymentsPage, | ||
name: 'IOU_Enable_Payments', | ||
name: 'IOU_Send_Enable_Payments', | ||
}]); | ||
|
||
const IOUDetailsModalStackNavigator = createModalStackNavigator([{ | ||
Component: IOUDetailsModal, | ||
name: 'IOU_Details_Root', | ||
}, | ||
{ | ||
Component: AddPersonalBankAccountPage, | ||
name: 'IOU_Details_Add_Bank_Account', | ||
}, | ||
{ | ||
Component: AddDebitCardPage, | ||
name: 'IOU_Details_Add_Debit_Card', | ||
}, | ||
{ | ||
Component: EnablePaymentsPage, | ||
name: 'IOU_Details_Enable_Payments', |
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.
As discussed with @marcaaron , I think we're adding some complexity in the code duplicating the AddDebitCardPage
and AddPersonalBankAccountPage
in two stacks.
If we duplicate them here, we need to pass them as parameters in IOUConfirmationList
, SettlementButtton
and IOUDetailsModal
instead of just using them in KYCWall
.
If we can simplify it using only two routes, that would help us in maintenance in the future.
What do you think @nickmurray47 ?
Also, this is NAB.
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 like the idea of using generic routes for these then they will exist outside of the underlying stack.
But I think in that case we should not have both <
and x
in their headers because they would both do the same thing.
This wasn't really ironed out in the doc so I followed the existing convention (we already had IOU_Enable_Payments
set up with a unique route).
ADD_PAYMENT_MENU_POSITION_Y: 226, | ||
ADD_PAYMENT_MENU_POSITION_X: 356, |
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.
Do we want to work with fixed values here independent of the platform and screen size? Just to be sure this will be how we're imagining in every device.
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.
This is a bit of temp code and a follow up created to address this here
Hmm yes the VirtualizedList warning exists on |
Ah I found a bug with some of the logic while testing and updated it. If you add a bank account and then log out and then try to send an IOU again after logging in we will not check the most recent list of payment methods and end up asking the user to enter one again. @nickmurray47 mind re-reviewing? |
Yeah, can take another look! catching up on context right now |
The ScrollView thing is being handled here #7088 |
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.
Nice, LGTM! Thanks for adding the screenshots in for the other platforms, I should've asked for those in the beginning.
Do you also mind adding just one last step to QA:
8. Logout after adding a bank account, log back in and verify that you do not hit the pay wall
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
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @danieldoglas in version: 1.1.27-2 🚀
|
🚀 Deployed to staging by @danieldoglas in version: 1.1.27-3 🚀
|
🚀 Deployed to staging by @danieldoglas in version: 1.1.27-3 🚀
|
@marcaaron @danieldoglas @nickmurray47 PR is ready to be QA-ed internally |
@mvtglobally This can be checked off. It's behind a beta and has been tested on staging. |
cc @nickmurray47
Details
Tracking issue and additional context: https://github.com/Expensify/Expensify/issues/185320
This PR adds a way to effectively "block" a specific user action that requires a gold wallet and then to "continue" that action once they successfully make it through these flows. Since the flows all happen on different pages/screens it is tricky to enable the "continue" part of whatever user action they were taking. By using a "pay wall" style component we can save a reference to the component whenever it is mounted and call it's defined "continue" callback.
AdditionalDetailsStep
was recently broken and the test steps here can't be completed until this is fixed.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/187804
$ https://github.com/Expensify/Expensify/issues/187803
Tests
QA Steps
Internal QA
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android