feat: [info] remove balance summaries from TDP (#7430)
This commit is contained in:
parent
1b7f0d11fd
commit
48379c66ce
@ -23,6 +23,7 @@ import TokenSafetyMessage from 'components/TokenSafety/TokenSafetyMessage'
|
||||
import TokenSafetyModal from 'components/TokenSafety/TokenSafetyModal'
|
||||
import { NATIVE_CHAIN_ID, nativeOnChain } from 'constants/tokens'
|
||||
import { checkWarning } from 'constants/tokenSafety'
|
||||
import { useInfoTDPEnabled } from 'featureFlags/flags/infoTDP'
|
||||
import { TokenPriceQuery } from 'graphql/data/__generated__/types-and-hooks'
|
||||
import { Chain, TokenQuery, TokenQueryData } from 'graphql/data/Token'
|
||||
import { QueryToken } from 'graphql/data/Token'
|
||||
@ -128,6 +129,7 @@ export default function TokenDetails({
|
||||
}, {} as { [key: string]: string | undefined }) ?? {},
|
||||
[tokenQueryData]
|
||||
)
|
||||
const isInfoTDPEnabled = useInfoTDPEnabled()
|
||||
|
||||
const { token: detailedToken, didFetchFromChain } = useRelevantToken(address, pageChainId, tokenQueryData)
|
||||
|
||||
@ -255,9 +257,9 @@ export default function TokenDetails({
|
||||
/>
|
||||
</div>
|
||||
{tokenWarning && <TokenSafetyMessage tokenAddress={address} warning={tokenWarning} />}
|
||||
{detailedToken && <BalanceSummary token={detailedToken} />}
|
||||
{!isInfoTDPEnabled && detailedToken && <BalanceSummary token={detailedToken} />}
|
||||
</RightPanel>
|
||||
{detailedToken && <MobileBalanceSummaryFooter token={detailedToken} />}
|
||||
{!isInfoTDPEnabled && detailedToken && <MobileBalanceSummaryFooter token={detailedToken} />}
|
||||
|
||||
<TokenSafetyModal
|
||||
isOpen={openTokenSafetyModal || !!continueSwap}
|
||||
|
@ -3,3 +3,7 @@ import { BaseVariant, FeatureFlag, useBaseFlag } from '../index'
|
||||
export function useInfoTDPFlag(): BaseVariant {
|
||||
return useBaseFlag(FeatureFlag.infoTDP)
|
||||
}
|
||||
|
||||
export function useInfoTDPEnabled(): boolean {
|
||||
return useInfoTDPFlag() === BaseVariant.Enabled
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user