From 0f31ba654a3b69466370703febd36f0515b29879 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Wed, 17 Jan 2024 13:21:31 -0800 Subject: [PATCH] fixup! Wrap existing TransactionListTop in a card --- .../TransactionListTop.test.tsx.snap | 952 +++++++++--------- src/components/themed/TransactionListTop.tsx | 32 +- 2 files changed, 499 insertions(+), 485 deletions(-) diff --git a/src/__tests__/components/__snapshots__/TransactionListTop.test.tsx.snap b/src/__tests__/components/__snapshots__/TransactionListTop.test.tsx.snap index 01afba19f61..38789d5296e 100644 --- a/src/__tests__/components/__snapshots__/TransactionListTop.test.tsx.snap +++ b/src/__tests__/components/__snapshots__/TransactionListTop.test.tsx.snap @@ -42,194 +42,249 @@ exports[`TransactionListTop should render (with ENABLE_VISA_PROGRAM) 1`] = ` - - - - - - - + + + + + } + > + + + + + wallet name + + +  + - - wallet name - + 0.00123123 BTC + + -  + $0.00 USD - - - 0.00123123 BTC - - - $0.00 USD - - - - - - - - - + + + + + } + > + + + + + wallet name + + +  + - - wallet name - + 0.00123123 BTC + + -  + $0.00 USD - - - 0.00123123 BTC - - - $0.00 USD - - { + const { account, navigation } = this.props + + triggerHaptic('impactLight') + Airship.show(bridge => ) + .then(result => { + if (result?.type === 'wallet') { + const { currencyCode, walletId } = result + const wallet = account.currencyWallets[walletId] + if (wallet == null) return + const tokenId = getTokenId(account, wallet.currencyInfo.pluginId, currencyCode) + navigation.setParams({ tokenId, walletId }) + } + }) + .catch(err => showError(err)) + } + handleMenu = () => { const { wallet, tokenId, navigation } = this.props triggerHaptic('impactLight') @@ -179,16 +198,14 @@ export class TransactionListTopComponent extends React.PureComponent + - + {walletName} - - - + @@ -207,7 +224,7 @@ export class TransactionListTopComponent extends React.PureComponent )} - + ) } @@ -432,6 +449,7 @@ const getStyles = cacheStyles((theme: Theme) => ({ buttonsContainer: { flex: 1, marginTop: theme.rem(1), + marginHorizontal: -theme.rem(1), flexDirection: 'row', justifyContent: 'space-evenly' },