|
|
@ -467,11 +467,11 @@ export function quotesToRenderableData( |
|
|
|
} = quote |
|
|
|
} = quote |
|
|
|
const sourceValue = calcTokenAmount( |
|
|
|
const sourceValue = calcTokenAmount( |
|
|
|
sourceAmount, |
|
|
|
sourceAmount, |
|
|
|
sourceTokenInfo.decimals || 18, |
|
|
|
sourceTokenInfo.decimals, |
|
|
|
).toString(10) |
|
|
|
).toString(10) |
|
|
|
const destinationValue = calcTokenAmount( |
|
|
|
const destinationValue = calcTokenAmount( |
|
|
|
destinationAmount, |
|
|
|
destinationAmount, |
|
|
|
destinationTokenInfo.decimals || 18, |
|
|
|
destinationTokenInfo.decimals, |
|
|
|
).toPrecision(8) |
|
|
|
).toPrecision(8) |
|
|
|
|
|
|
|
|
|
|
|
const { |
|
|
|
const { |
|
|
@ -501,14 +501,11 @@ export function quotesToRenderableData( |
|
|
|
destinationTokenInfo.symbol === 'ETH' |
|
|
|
destinationTokenInfo.symbol === 'ETH' |
|
|
|
? calcTokenAmount( |
|
|
|
? calcTokenAmount( |
|
|
|
destinationAmount, |
|
|
|
destinationAmount, |
|
|
|
destinationTokenInfo.decimals || 18, |
|
|
|
destinationTokenInfo.decimals, |
|
|
|
).minus(rawEthFee, 10) |
|
|
|
).minus(rawEthFee, 10) |
|
|
|
: new BigNumber(tokenConversionRate || 0, 10) |
|
|
|
: new BigNumber(tokenConversionRate || 0, 10) |
|
|
|
.times( |
|
|
|
.times( |
|
|
|
calcTokenAmount( |
|
|
|
calcTokenAmount(destinationAmount, destinationTokenInfo.decimals), |
|
|
|
destinationAmount, |
|
|
|
|
|
|
|
destinationTokenInfo.decimals || 18, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
10, |
|
|
|
10, |
|
|
|
) |
|
|
|
) |
|
|
|
.minus(rawEthFee, 10) |
|
|
|
.minus(rawEthFee, 10) |
|
|
|