Skip to content

Commit 618a853

Browse files
authored
Merge pull request #6039 from blockchain/fix/dex
Fix/dex
2 parents eb87914 + f0b9f99 commit 618a853

File tree

2 files changed

+12
-8
lines changed
  • packages/blockchain-wallet-v4-frontend/src

2 files changed

+12
-8
lines changed

packages/blockchain-wallet-v4-frontend/src/data/components/dex/sagas.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne
171171
) as DexSwapForm
172172

173173
const isTokenAllowed = S.getTokenAllowanceStatus(yield select()).getOrElse(false)
174+
const isTokenAllowedAfterPolling = S.getTokenAllowanceStatusAfterPolling(
175+
yield select()
176+
).getOrElse(false)
174177

175178
if (
176179
!formValues ||
@@ -237,7 +240,8 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne
237240
symbol: baseToken
238241
},
239242
params: {
240-
skipValidation: !isTokenAllowed && baseToken !== NATIVE_TOKEN,
243+
skipValidation:
244+
!isTokenAllowed && !isTokenAllowedAfterPolling && baseToken !== NATIVE_TOKEN,
241245
slippage: `${slippage}`
242246
},
243247
takerAddress: `${nonCustodialAddress}`,

packages/blockchain-wallet-v4-frontend/src/scenes/Dex/Swap/components/QuoteDetails/QuoteDetails.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ export const QuoteDetails = ({
139139
<Text color={SemanticColors.title} variant='paragraph2'>
140140
~
141141
{Exchange.convertCoinToCoin({
142-
coin: props.swapQuote.quote.buyAmount.symbol,
143-
value: (props.swapQuote.quote.buyAmount.amount / 100) * 0.9
142+
coin: props.swapQuote.quote.sellAmount.symbol,
143+
value: (props.swapQuote.quote.sellAmount.amount / 100) * 0.9
144144
})}{' '}
145-
{props.swapQuote.quote.buyAmount.symbol}
145+
{props.swapQuote.quote.sellAmount.symbol}
146146
</Text>
147147
<Flex>
148148
~
149149
<FiatDisplay
150-
coin={props.swapQuote.quote.buyAmount.symbol}
150+
coin={props.swapQuote.quote.sellAmount.symbol}
151151
currency={walletCurrency}
152152
color='grey700'
153153
lineHeight='150%'
@@ -157,10 +157,10 @@ export const QuoteDetails = ({
157157
>
158158
{Exchange.convertCoinToCoin({
159159
baseToStandard: false,
160-
coin: props.swapQuote.quote.buyAmount.symbol,
160+
coin: props.swapQuote.quote.sellAmount.symbol,
161161
value: Exchange.convertCoinToCoin({
162-
coin: props.swapQuote.quote.buyAmount.symbol,
163-
value: (props.swapQuote.quote.buyAmount.amount / 100) * 0.9
162+
coin: props.swapQuote.quote.sellAmount.symbol,
163+
value: (props.swapQuote.quote.sellAmount.amount / 100) * 0.9
164164
})
165165
})}
166166
</FiatDisplay>

0 commit comments

Comments
 (0)