Skip to content

Commit

Permalink
Revert "fix(wallet-mobile): flickering when nav back to portfolio"
Browse files Browse the repository at this point in the history
This reverts commit 52c3aa4.
  • Loading branch information
stackchain committed Oct 4, 2024
1 parent e98bc7e commit 30c3ac8
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,7 @@ export const useNavigateTo = () => {
nftsList: () => navigation.navigate('portfolio-nfts', {screen: 'nft-gallery'}),
nftDetails: (id: Portfolio.Token.Id) =>
navigation.navigate('portfolio-nfts', {screen: 'nft-details', params: {id}, initial: false}),
resetTabAndSend: () => {
navigation.reset({index: 0, routes: [{name: 'dashboard-portfolio'}]})
navigation.navigate('history', {screen: 'send-start-tx'})
},
resetTabAndSwap: () => {
navigation.reset({index: 0, routes: [{name: 'dashboard-portfolio'}]})
navigation.navigate('history', {
screen: 'swap-start-swap',
params: {screen: 'token-swap'},
})
},
send: () => navigation.navigate('history', {screen: 'send-start-tx'}),
swap: () =>
navigation.navigate('history', {
screen: 'swap-start-swap',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ export const Actions = ({tokenInfo}: Props) => {
from_asset: [
{asset_name: portfolioPrimaryTokenInfo.name, asset_ticker: portfolioPrimaryTokenInfo.ticker, policy_id: ''},
],
to_asset: [{asset_name: tokenInfo.name, asset_ticker: tokenInfo.ticker, policy_id: tokenInfo.id}],
to_asset: [
{asset_name: tokenInfo.name ?? '', asset_ticker: tokenInfo.ticker ?? '', policy_id: tokenInfo.id ?? ''},
],
order_type: swap.orderData.type,
slippage_tolerance: swap.orderData.slippage,
})

navigateTo.resetTabAndSwap()
navigateTo.swap()
}

return (
Expand All @@ -62,7 +64,7 @@ export const Actions = ({tokenInfo}: Props) => {
outlineOnLight
title={strings.send.toLocaleUpperCase()}
startContent={<Icon.Send color={colors.primary} size={24} />}
onPress={navigateTo.resetTabAndSend}
onPress={navigateTo.send}
/>

<Button
Expand Down
96 changes: 48 additions & 48 deletions apps/wallet-mobile/translations/messages/src/WalletNavigator.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,179 +4,179 @@
"defaultMessage": "!!!Transactions",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 306,
"line": 308,
"column": 22,
"index": 10644
"index": 10768
},
"end": {
"line": 309,
"line": 311,
"column": 3,
"index": 10747
"index": 10871
}
},
{
"id": "components.txhistory.txnavigationbuttons.sendButton",
"defaultMessage": "!!!Send",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 310,
"line": 312,
"column": 14,
"index": 10763
"index": 10887
},
"end": {
"line": 313,
"line": 315,
"column": 3,
"index": 10862
"index": 10986
}
},
{
"id": "components.txhistory.txnavigationbuttons.receiveButton",
"defaultMessage": "!!!Receive",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 314,
"line": 316,
"column": 17,
"index": 10881
"index": 11005
},
"end": {
"line": 317,
"line": 319,
"column": 3,
"index": 10986
"index": 11110
}
},
{
"id": "components.common.navigation.dashboardButton",
"defaultMessage": "!!!Dashboard",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 318,
"line": 320,
"column": 19,
"index": 11007
"index": 11131
},
"end": {
"line": 321,
"line": 323,
"column": 3,
"index": 11104
"index": 11228
}
},
{
"id": "components.common.navigation.delegateButton",
"defaultMessage": "!!!Delegate",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 322,
"line": 324,
"column": 18,
"index": 11124
"index": 11248
},
"end": {
"line": 325,
"line": 327,
"column": 3,
"index": 11219
"index": 11343
}
},
{
"id": "components.settings.walletsettingscreen.tabTitle",
"defaultMessage": "!!!Wallet",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 326,
"line": 328,
"column": 16,
"index": 11237
"index": 11361
},
"end": {
"line": 329,
"line": 331,
"column": 3,
"index": 11335
"index": 11459
}
},
{
"id": "global.staking",
"defaultMessage": "!!!Staking",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 330,
"line": 332,
"column": 17,
"index": 11354
"index": 11478
},
"end": {
"line": 333,
"line": 335,
"column": 3,
"index": 11419
"index": 11543
}
},
{
"id": "components.common.navigation.nftGallery",
"defaultMessage": "!!!NFT Gallery",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 334,
"line": 336,
"column": 14,
"index": 11435
"index": 11559
},
"end": {
"line": 337,
"line": 339,
"column": 3,
"index": 11529
"index": 11653
}
},
{
"id": "menu",
"defaultMessage": "!!!Menu",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 338,
"line": 340,
"column": 14,
"index": 11545
"index": 11669
},
"end": {
"line": 341,
"line": 343,
"column": 3,
"index": 11597
"index": 11721
}
},
{
"id": "components.common.navigation.discover",
"defaultMessage": "!!!Discover",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 342,
"line": 344,
"column": 18,
"index": 11617
"index": 11741
},
"end": {
"line": 345,
"line": 347,
"column": 3,
"index": 11706
"index": 11830
}
},
{
"id": "components.walletselection.walletselectionscreen.header",
"defaultMessage": "!!!My wallets",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 346,
"line": 348,
"column": 31,
"index": 11739
"index": 11863
},
"end": {
"line": 349,
"line": 351,
"column": 3,
"index": 11848
"index": 11972
}
},
{
"id": "global.portfolio",
"defaultMessage": "!!!Portfolio",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 350,
"line": 352,
"column": 19,
"index": 11869
"index": 11993
},
"end": {
"line": 353,
"line": 355,
"column": 3,
"index": 11938
"index": 12062
}
}
]

0 comments on commit 30c3ac8

Please sign in to comment.