-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix: We show wallet balance badge even for those who haven't enabled Expensify wallet #61888
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
Conversation
@hungvu193 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] |
@@ -393,7 +394,7 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr | |||
item.action(); | |||
})} | |||
iconStyles={item.iconStyles} | |||
badgeText={item.badgeText ?? getWalletBalance(isPaymentItem)} | |||
badgeText={hasActivatedWallet ? item.badgeText ?? getWalletBalance(isPaymentItem) : undefined} |
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.
@hungvu193 @twilight2294 I was taking about this thing in the issue comments. This removes the badgeText of Subscription row as well.
Use this line instead as i mentioned it in my proposal.
badgeText={item.badgeText ?? getWalletBalance(hasActivatedWallet && isPaymentItem)}
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.
@Burhan-Rashid for the things you mentioend we need to update:
App/src/pages/settings/InitialSettingsPage.tsx
Lines 180 to 185 in a28bb93
translationKey: 'common.wallet', | |
icon: Expensicons.Wallet, | |
screenName: SCREENS.SETTINGS.WALLET.ROOT, | |
brickRoadIndicator: walletBrickRoadIndicator, | |
action: () => Navigation.navigate(ROUTES.SETTINGS_WALLET), | |
}, |
lines to align a proper fix anot not what you suggested in your proposal
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 just redundant to do it that way
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.
Thanks @Burhan-Rashid for letting us know this one. I appreciate it 😄
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.
you're welcome @hungvu193 😄
<ActivityIndicator | ||
color={theme.spinner} | ||
size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE} | ||
style={[styles.mt7, styles.mb5]} | ||
/> | ||
) : ( | ||
)} | ||
{!shouldShowLoadingSpinner && hasActivatedWallet && ( |
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 don't think this change is required as in the issue they only mentioned to remove the badgeText from the wallet row not the actual wallet page. If we remove it from wallet page as well then user has to always enable the wallet to see the wallet balance that won't be a good user experience. @twilight2294 @m-natarajan
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.
enable the wallet to see the wallet balance that won't be a good user experience
The purpose here is to hide the balance if the wallet is not enabled at the first place, so this was done. c.c. @hungvu193
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid.movAndroid: mWeb ChromeScreen.Recording.2025-05-14.at.12.54.35.moviOS: HybridApphybridios.moviOS: mWeb SafarimSafari.movMacOS: Chrome / SafariChrome.movMacOS: DesktopDesktop.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.
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. |
Explanation of Change
Fixed Issues
$ #61248
PROPOSAL: #61248 (comment)
Tests
Same as QA
Offline tests
Same as QA
QA Steps
Verify that we don't see The balance field in the
Expensify Wallet (Beta)
section:Verify that we don't see The
$0.00
in the wallet section of the settings screen:PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
Screen_recording_20250513_135337.mp4
Android: mWeb Chrome
Screen_recording_20250513_135440.mp4
iOS: Native
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-05-13.at.13.48.06.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-05-13.at.13.48.51.mp4
MacOS: Chrome / Safari
MacOS: Desktop