-
Notifications
You must be signed in to change notification settings - Fork 80
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
chore: remove nft gallery and old token details #5016
Changes from 16 commits
0303a66
10cccc8
fe747e0
e2af517
419f1b7
a13c34e
9a49272
2a64297
ec6dd4b
0838a89
0fb5770
5145410
f42ac27
09c020c
4d84eef
eb0e334
4f70905
6fb2c1d
3a38b24
62c8ea5
99c38dc
93a5631
047325d
fcedcf6
0459fa9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,14 +211,7 @@ export function AssetsTokenBalance({ showInfo }: { showInfo: boolean }) { | |
</TouchableOpacity> | ||
)} | ||
</View> | ||
<TokenBalance | ||
style={ | ||
getFeatureGate(StatsigFeatureGates.SHOW_ASSET_DETAILS_SCREEN) | ||
? styles.totalBalance | ||
: styles.balance | ||
} | ||
singleTokenViewEnabled={false} | ||
/> | ||
<TokenBalance style={styles.totalBalance} singleTokenViewEnabled={false} /> | ||
|
||
{shouldRenderInfoComponent && ( | ||
<Animated.View style={[styles.totalAssetsInfoContainer, animatedStyles]}> | ||
|
@@ -242,11 +235,7 @@ export function HomeTokenBalance() { | |
ValoraAnalytics.track(HomeEvents.view_token_balances, { | ||
totalBalance: totalBalance?.toString(), | ||
}) | ||
navigate( | ||
getFeatureGate(StatsigFeatureGates.SHOW_ASSET_DETAILS_SCREEN) | ||
? Screens.Assets | ||
: Screens.TokenBalances | ||
) | ||
navigate(Screens.Assets) | ||
} | ||
|
||
const onCloseDialog = () => { | ||
|
@@ -276,20 +265,13 @@ export function HomeTokenBalance() { | |
> | ||
{t('whatTotalValue.body')} | ||
</Dialog> | ||
{(getFeatureGate(StatsigFeatureGates.SHOW_ASSET_DETAILS_SCREEN) || | ||
tokenBalances.length >= 1) && ( | ||
<TouchableOpacity style={styles.row} onPress={onViewBalances} testID="ViewBalances"> | ||
<Text style={styles.viewBalances}>{t('viewBalances')}</Text> | ||
<ProgressArrow style={styles.arrow} color={Colors.primary} /> | ||
</TouchableOpacity> | ||
)} | ||
<TouchableOpacity style={styles.row} onPress={onViewBalances} testID="ViewBalances"> | ||
<Text style={styles.viewBalances}>{t('viewBalances')}</Text> | ||
<ProgressArrow style={styles.arrow} color={Colors.primary} /> | ||
</TouchableOpacity> | ||
</View> | ||
<TokenBalance | ||
style={ | ||
getFeatureGate(StatsigFeatureGates.SHOW_ASSET_DETAILS_SCREEN) | ||
? styles.totalBalance | ||
: styles.balance | ||
} | ||
style={styles.totalBalance} | ||
showHideHomeBalancesToggle={getFeatureGate( | ||
StatsigFeatureGates.SHOW_HIDE_HOME_BALANCES_TOGGLE | ||
)} | ||
|
@@ -301,31 +283,22 @@ export function HomeTokenBalance() { | |
export function FiatExchangeTokenBalance() { | ||
const { t } = useTranslation() | ||
const totalBalance = useTotalTokenBalance() | ||
const tokenBalances = useTokensWithTokenBalance() | ||
|
||
const onViewBalances = () => { | ||
ValoraAnalytics.track(FiatExchangeEvents.cico_landing_token_balance, { | ||
totalBalance: totalBalance?.toString(), | ||
}) | ||
navigate( | ||
getFeatureGate(StatsigFeatureGates.SHOW_ASSET_DETAILS_SCREEN) | ||
? Screens.Assets | ||
: Screens.TokenBalances | ||
) | ||
navigate(Screens.Assets) | ||
} | ||
|
||
return ( | ||
<View style={styles.container} testID="FiatExchangeTokenBalance"> | ||
<View style={styles.titleExchange}> | ||
<View style={styles.row}> | ||
{tokenBalances.length > 1 ? ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This behavior was updated because the tests were coupled together. Now the behavior of the home token balances and the fiat exchange token balances matches. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. The behavior is different when show_asset_details_screen was set to true which is 100%. If we want to keep the behavior of the existing FiatExchangeTokenBalance some tests will need to be updated. Due to the coupled testing it was unclear if we ever expected these two components to diverge in behavior like they have. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the FiatExchangeTokenBalance behavior has always been different from the HomeTokenBalance behavior. I think we had coupled tests prior just because the case for 0 tokens overlapped. Can't we just drop the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<TouchableOpacity style={styles.row} onPress={onViewBalances} testID="ViewBalances"> | ||
<Text style={styles.exchangeTotalValue}>{t('totalValue')}</Text> | ||
<ProgressArrow style={styles.exchangeArrow} height={9.62} color={Colors.gray4} /> | ||
</TouchableOpacity> | ||
) : ( | ||
<TouchableOpacity style={styles.row} onPress={onViewBalances} testID="ViewBalances"> | ||
<Text style={styles.exchangeTotalValue}>{t('totalValue')}</Text> | ||
)} | ||
<ProgressArrow style={styles.exchangeArrow} height={9.62} color={Colors.gray4} /> | ||
</TouchableOpacity> | ||
</View> | ||
</View> | ||
<TokenBalance style={styles.exchangeBalance} /> | ||
|
This file was deleted.
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 controlling multiple features flags. Open to other options on how to handle this.
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.
Seems like the TokenBalance.tsx only references
SHOW_HIDE_HOME_BALANCES_TOGGLE
gate now that theSHOW_ASSET_DETAILS_SCREEN
gate is removed?Could change this and all below references to this (and just update true / false appropriately)
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.
Fixed in 6fb2c1d!