Commit 79da4fb 1 parent b621b83 commit 79da4fb Copy full SHA for 79da4fb
File tree 2 files changed +13
-9
lines changed
apps/wallet-mobile/src/features/Swap/useCases/CreateOrder
2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ export const EstimateSummary = () => {
21
21
const swapForm = useSwap ( )
22
22
const { openModal} = useModal ( )
23
23
24
+ const tokenInInfo = swapForm . tokenInfos . get ( swapForm . tokenInInput . tokenId ?? undefinedToken )
25
+ const tokenOutInfo = swapForm . tokenInfos . get ( swapForm . tokenOutInput . tokenId ?? undefinedToken )
26
+
27
+ const tokenInTicker = tokenInInfo ?. ticker ?? tokenInInfo ?. name ?? '-'
28
+ const tokenOutTicker = tokenOutInfo ?. ticker ?? tokenOutInfo ?. name ?? '-'
29
+
24
30
const protocol = swapForm . estimate ?. splits [ 0 ] ?. protocol
25
31
26
32
const expand = ( ) =>
@@ -68,7 +74,7 @@ export const EstimateSummary = () => {
68
74
< Row
69
75
label = { strings . price }
70
76
description = { swapForm . orderType === 'limit' ? strings . limitPriceInfo : strings . marketPriceInfo }
71
- value = { `${ swapForm . estimate ?. netPrice } ${ wallet . portfolioPrimaryTokenInfo . ticker } ` }
77
+ value = { `1 ${ tokenInTicker } = ${ swapForm . estimate ?. netPrice } ${ tokenOutTicker } ` }
72
78
/>
73
79
74
80
< Row
@@ -80,9 +86,7 @@ export const EstimateSummary = () => {
80
86
< Row
81
87
label = { strings . swapMinReceivedTitle }
82
88
description = { strings . swapMinReceived }
83
- value = { `${ swapForm . estimate ?. totalOutput } ${
84
- swapForm . tokenInfos . get ( swapForm . tokenOutInput . tokenId ?? undefinedToken ) ?. ticker
85
- } `}
89
+ value = { `${ swapForm . estimate ?. totalOutput } ${ tokenOutTicker } ` }
86
90
/>
87
91
88
92
< Row
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ export const LimitInput = () => {
15
15
const { isDark} = useTheme ( )
16
16
17
17
const swapForm = useSwap ( )
18
- const sellTokenInfo = swapForm . tokenInfos . get ( swapForm . tokenInInput . tokenId ?? undefinedToken )
19
- const buyTokenInfo = swapForm . tokenInfos . get ( swapForm . tokenOutInput . tokenId ?? undefinedToken )
18
+ const tokenInInfo = swapForm . tokenInfos . get ( swapForm . tokenInInput . tokenId ?? undefinedToken )
19
+ const tokenOutInfo = swapForm . tokenInfos . get ( swapForm . tokenOutInput . tokenId ?? undefinedToken )
20
20
const disabled = swapForm . orderType === 'market'
21
21
22
- const tokenToSellName = sellTokenInfo ?. ticker ?? sellTokenInfo ?. name ?? '-'
23
- const tokenToBuyName = buyTokenInfo ?. ticker ?? buyTokenInfo ?. name ?? '-'
24
- const pair = `${ tokenToBuyName } /${ tokenToSellName } `
22
+ const tokenInTicker = tokenInInfo ?. ticker ?? tokenInInfo ?. name ?? '-'
23
+ const tokenOutTicker = tokenOutInfo ?. ticker ?? tokenOutInfo ?. name ?? '-'
24
+ const pair = `${ tokenOutTicker } /${ tokenInTicker } `
25
25
26
26
return (
27
27
< >
You can’t perform that action at this time.
0 commit comments