mirror of
https://github.com/kremalicious/asi-calculator.git
synced 2024-12-22 09:23:16 +01:00
UX tweaks for migration tool scenario
* hide conversions not supported by migration tool
This commit is contained in:
parent
fc23958849
commit
62725c8463
@ -51,39 +51,46 @@ export function SwapResults({
|
|||||||
: amount
|
: amount
|
||||||
: amountInUsd / prices.fet.usd
|
: amountInUsd / prices.fet.usd
|
||||||
|
|
||||||
|
const showOcean = !isMigration || (isMigration && tokenSelected === 'ocean')
|
||||||
|
const showAgix = !isMigration || (isMigration && tokenSelected === 'agix')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Result
|
{showOcean ? (
|
||||||
token={getTokenBySymbol('OCEAN')}
|
<Result
|
||||||
amount={amountToOceanUniswap || amountToOcean}
|
token={getTokenBySymbol('OCEAN')}
|
||||||
amountAsi={(amountToOceanUniswap || amountToOcean) * ratioOceanToAsi}
|
amount={amountToOceanUniswap || amountToOcean}
|
||||||
amountFiat={
|
amountAsi={(amountToOceanUniswap || amountToOcean) * ratioOceanToAsi}
|
||||||
(amountToOceanUniswap || amountToOcean) *
|
amountFiat={
|
||||||
ratioOceanToAsi *
|
(amountToOceanUniswap || amountToOcean) *
|
||||||
prices.asi.usd
|
ratioOceanToAsi *
|
||||||
}
|
prices.asi.usd
|
||||||
amountOriginalFiat={
|
}
|
||||||
(amountToOceanUniswap || amountToOcean) * prices.ocean.usd
|
amountOriginalFiat={
|
||||||
}
|
(amountToOceanUniswap || amountToOcean) * prices.ocean.usd
|
||||||
isValidating={isValidatingToOcean || isValidatingPrices}
|
}
|
||||||
isLoading={isLoadingToOcean || isLoadingPrices}
|
isValidating={isValidatingToOcean || isValidatingPrices}
|
||||||
/>
|
isLoading={isLoadingToOcean || isLoadingPrices}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
|
||||||
<Result
|
{showAgix ? (
|
||||||
token={getTokenBySymbol('AGIX')}
|
<Result
|
||||||
amount={amountToAgixUniswap || amountToAgix}
|
token={getTokenBySymbol('AGIX')}
|
||||||
amountAsi={(amountToAgixUniswap || amountToAgix) * ratioAgixToAsi}
|
amount={amountToAgixUniswap || amountToAgix}
|
||||||
amountFiat={
|
amountAsi={(amountToAgixUniswap || amountToAgix) * ratioAgixToAsi}
|
||||||
(amountToAgixUniswap || amountToAgix) *
|
amountFiat={
|
||||||
ratioAgixToAsi *
|
(amountToAgixUniswap || amountToAgix) *
|
||||||
prices.asi.usd
|
ratioAgixToAsi *
|
||||||
}
|
prices.asi.usd
|
||||||
amountOriginalFiat={
|
}
|
||||||
(amountToAgixUniswap || amountToAgix) * prices.agix.usd
|
amountOriginalFiat={
|
||||||
}
|
(amountToAgixUniswap || amountToAgix) * prices.agix.usd
|
||||||
isValidating={isValidatingToAgix || isValidatingPrices}
|
}
|
||||||
isLoading={isLoadingToAgix || isLoadingPrices}
|
isValidating={isValidatingToAgix || isValidatingPrices}
|
||||||
/>
|
isLoading={isLoadingToAgix || isLoadingPrices}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
|
||||||
<Result
|
<Result
|
||||||
token={getTokenBySymbol('FET')}
|
token={getTokenBySymbol('FET')}
|
||||||
|
Loading…
Reference in New Issue
Block a user