Repository navigation
[Payment due @ZhenjaHorbach] [NoQA][Wise][Release 1] UI - Create Intro Screen #104334
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
Merged
grgia
merged 10 commits into
Expensify:main
from
software-mansion-labs:wise-global-reimbursements-intro-page
Oct 19, 2026
+209
−1
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0cbe359
feat: add Wise global reimbursements intro page
WojtekBoman 3e5ef16
fix: show loading on Wise intro page and regroup its size variable
WojtekBoman 1e65374
fix: use goBackToWallet in Wise intro page beta redirect effect
WojtekBoman 580b5a3
fix: wait for payment methods fetch before checking Wise intro eligib…
WojtekBoman bc62b61
fix: set shouldUseGoBackButton on Wise intro page loading indicator
WojtekBoman 7b03eb7
chore: remove TODO comments from Wise global reimbursements code
WojtekBoman ebb70ed
fix: add heading role and hide decorative illustration in Confirmatio…
WojtekBoman 9bf3043
fix: show loader instead of not-found on cold Wise intro deep link
WojtekBoman b820e21
fix: hide Wise intro for accounts already set up with Corpay
WojtekBoman 5389405
Merge branch 'main' into wise-global-reimbursements-intro-page
WojtekBoman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
src/pages/settings/Wallet/WiseGlobalReimbursementsIntroPage.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; | ||
| import ConfirmationPage from '@components/ConfirmationPage'; | ||
| import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; | ||
| import Header from '@components/Header'; | ||
| import ScreenWrapper from '@components/ScreenWrapper'; | ||
|
|
||
| import {useMemoizedLazyIllustrations} from '@hooks/useLazyAsset'; | ||
| import useLocalize from '@hooks/useLocalize'; | ||
| import useOnyx from '@hooks/useOnyx'; | ||
| import usePermissions from '@hooks/usePermissions'; | ||
| import useStyleUtils from '@hooks/useStyleUtils'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
|
|
||
| import {isEligibleForWiseGlobalReimbursements} from '@libs/BankAccountUtils'; | ||
| import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; | ||
|
|
||
| import Navigation from '@navigation/Navigation'; | ||
| import type {SettingsNavigatorParamList} from '@navigation/types'; | ||
|
|
||
| import variables from '@styles/variables'; | ||
|
|
||
| import CONST from '@src/CONST'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
| import ROUTES from '@src/ROUTES'; | ||
| import type SCREENS from '@src/SCREENS'; | ||
| import isLoadingOnyxValue from '@src/types/utils/isLoadingOnyxValue'; | ||
|
|
||
| import React, {useEffect} from 'react'; | ||
|
|
||
| type WiseGlobalReimbursementsIntroPageProps = PlatformStackScreenProps<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.WALLET.WISE_GLOBAL_REIMBURSEMENTS_INTRO>; | ||
|
|
||
| function WiseGlobalReimbursementsIntroPage({route}: WiseGlobalReimbursementsIntroPageProps) { | ||
| const bankAccountID = Number(route.params.bankAccountID); | ||
| const [bankAccountList, bankAccountListMetadata] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST); | ||
| const [isLoadingPaymentMethods = true] = useOnyx(ONYXKEYS.IS_LOADING_PAYMENT_METHODS); | ||
| const bankAccount = bankAccountList?.[bankAccountID]; | ||
|
|
||
| const {translate} = useLocalize(); | ||
| const {isBetaEnabledOrUnknown} = usePermissions(); | ||
| const isWiseReimbursementsBetaEnabled = isBetaEnabledOrUnknown(CONST.BETAS.WISE_REIMBURSEMENTS); | ||
| const styles = useThemeStyles(); | ||
| const StyleUtils = useStyleUtils(); | ||
| const illustrations = useMemoizedLazyIllustrations(['EarthWithCoins']); | ||
|
|
||
| const goBackToWallet = () => Navigation.goBack(ROUTES.SETTINGS_WALLET); | ||
|
|
||
| // Close the page instead of showing "not found" when the user lacks the beta. Wait for betas to load first | ||
| useEffect(() => { | ||
| if (isWiseReimbursementsBetaEnabled !== false) { | ||
|
grgia marked this conversation as resolved.
|
||
| return; | ||
| } | ||
| goBackToWallet(); | ||
| }, [isWiseReimbursementsBetaEnabled, goBackToWallet]); | ||
|
|
||
| // On a cold direct link the account list can be empty until the payment-method fetch finishes, so wait for it before judging eligibility | ||
| const isWaitingForBankAccount = !bankAccount && !!isLoadingPaymentMethods; | ||
|
|
||
| if (isLoadingOnyxValue(bankAccountListMetadata) || isWaitingForBankAccount || !isWiseReimbursementsBetaEnabled) { | ||
| return <FullScreenLoadingIndicator shouldUseGoBackButton />; | ||
| } | ||
|
|
||
| return ( | ||
| <ScreenWrapper testID="WiseGlobalReimbursementsIntroPage"> | ||
| <FullPageNotFoundView | ||
| shouldShow={!isEligibleForWiseGlobalReimbursements(bankAccount?.accountData)} | ||
| onBackButtonPress={goBackToWallet} | ||
| > | ||
| <Header> | ||
| <Header.BackButton onPress={goBackToWallet} /> | ||
| <Header.Title title={translate('common.enableGlobalReimbursements')} /> | ||
| </Header> | ||
| <ConfirmationPage | ||
| illustration={illustrations.EarthWithCoins} | ||
| illustrationStyle={StyleUtils.getWidthAndHeightStyle(variables.wiseGlobalReimbursementsIntroIllustrationSize)} | ||
| heading={translate('walletPage.wiseGlobalReimbursementsIntro.title')} | ||
| description={translate('walletPage.wiseGlobalReimbursementsIntro.subtitle')} | ||
| descriptionStyle={styles.textSupporting} | ||
| shouldShowSecondaryButton | ||
| secondaryButtonText={translate('common.notNow')} | ||
| onSecondaryButtonPress={goBackToWallet} | ||
| shouldShowButton | ||
| buttonText={translate('walletPage.wiseGlobalReimbursementsIntro.getStarted')} | ||
| onButtonPress={() => {}} | ||
| /> | ||
| </FullPageNotFoundView> | ||
| </ScreenWrapper> | ||
| ); | ||
| } | ||
|
|
||
| export default WiseGlobalReimbursementsIntroPage; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
App/src/pages/settings/Wallet/WalletPage/index.tsx
Line 442 in bdc5378
@WojtekBoman do we need to apply this here too? there is also a check for
!verifications.corpay(ie the bank account has existing verification) so we may need to add for both