-
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
[Internal QA] Add enable wallet state button if the submitter hasn't completed the kyc #29430
Conversation
Deploying with Cloudflare Pages
|
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.
Looks good so far! Some minor comments.
@fedirjh, we'd appreciate a code review from you as well. This one is critical for an upcoming conference.
I can handle testing on all platforms since this requires a Gold wallet.
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.
The code looks good, but it still should be tested. Is there a beta for the gold wallet?
@techievivek can you also merge main into this branch? |
I'm testing now. Everyone is on the wallet beta (with a silver wallet) but we do not have the ability to create test gold wallets at the moment. |
@techievivek I notice that the send money flow keeps redirecting the payer to the KYC flow even if the payer's wallet is activated: Screen.Recording.2023-10-18.at.3.58.17.PM.mov |
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.
Noticed a few things:
- We need to direct the user to add a PBA first if they don't have one, this logic is handled by the KYCWall component, I think we should be able to use it here.
- I'm seeing the report action twice and with incorrect messaging:
Payer with gold wallet sees this:
Payee with silver wallet sees this:
In the interest of saving time, I've DRY'd some code and added the use of the KYCWall |
We still need to:
|
) : null} | ||
)} | ||
{shouldShowEnableWalletButton && ( | ||
<KYCWall |
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 believe there may be a console error due to using KYCWall in ReportActionItemBasicMessage
. IIRC that was the case when I attempted the same change.
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.
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.
Testing it, thanks.
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.
That worked 🎉, but I am curious to learn how it fixed that error? Because there is just a single element right? KYCWall
so why do we need a fragment here?
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 ReportActionItemBasicMessage
expects only one element, it is necessary to wrap both the "Add Bank" button and the KYCWall
with a fragment. Without this fragment, React will treat both elements (the first button and the KYCWall
) as an array. It's important to note that even if the { bool && <Component /> }
condition evaluates to false
, it will still be passed to the parent component as a false
value. So, in our case, it's passed as [false, KYCWall]
. By wrapping them in a single fragment, it ensures that they are always passed as a single element.
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.
Interesting, but by just wrapping the KycWall in a fragment it looks like the error is gone, how does that work? Any idea?
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.
Ah no, the user is alreadt on the gold wallet that's why this condition is not being called.
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.
The error is still there. What you explained make sense now. Thanks 👍
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.
The code looks good. I just tested some hardcoded values and it seems to be working fine
CleanShot.2023-10-18.at.18.13.08-converted.mp4
) : null} | ||
)} | ||
{shouldShowEnableWalletButton && ( | ||
<KYCWall |
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.
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-10-19.at.11.46.58.AM.movScreen.Recording.2023-10-19.at.11.54.57.AM.movMobile Web - ChromeScreen.Recording.2023-10-19.at.11.56.57.AM.movMobile Web - SafariScreen.Recording.2023-10-19.at.12.06.15.PM.movDesktopScreen.Recording.2023-10-19.at.11.55.35.AM.moviOSScreen.Recording.2023-10-19.at.12.08.33.PM.movAndroidScreen.Recording.2023-10-19.at.12.51.13.PM.mov |
LGTM, we're going to address polish items in follow up PRs. Please final review, @fedirjh 🙏🏼 |
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.
Looks good to me, just one little change and should be ready to get merged.
<Button | ||
success | ||
style={[styles.w100, styles.requestPreviewBox]} | ||
text={props.translate('bankAccount.addBankAccount')} | ||
onPress={() => BankAccounts.openPersonalBankAccountSetupView(props.report.reportID)} | ||
pressOnEnter | ||
/> | ||
) : null} | ||
)} | ||
<> |
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 fragment should wrap both elements, the button and the KYCWall
.
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.
Looks good to me.
@thienlnam Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
✋ 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 https://github.com/MariaHCD in version: 1.3.88-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.88-11 🚀
|
@@ -588,6 +588,8 @@ export default { | |||
duplicateWaypointsErrorMessage: 'Por favor elimina los puntos de ruta duplicados', | |||
emptyWaypointsErrorMessage: 'Por favor introduce al menos dos puntos de ruta', | |||
}, | |||
waitingOnEnabledWallet: ({submitterDisplayName}: WaitingOnBankAccountParams) => `nicio el pago, pero no se procesará hasta que ${submitterDisplayName} active su Billetera`, |
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.
@techievivek this should be Inició
or inició
, can you submit a PR to update please?
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.
Details
If there are queued reimbursements for the user and if they are on silver wallet then let's show an enable wallet button that will allow the user to add the wallet to receive the reimbursements.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/324579
PROPOSAL:
Tests
enable wallet
button.enable wallet
button and it should open theenable-payment
page.Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
MacOS: Chrome / Safari
Screen.Recording.2023-10-17.at.10.52.27.PM.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Desktop