UX tweaks for migration tool scenario

* hide conversions not supported by migration tool
This commit is contained in:
Matthias Kretschmann 2024-07-01 17:41:37 +01:00
parent fc23958849
commit 62725c8463
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -51,39 +51,46 @@ export function SwapResults({
: amount
: amountInUsd / prices.fet.usd
const showOcean = !isMigration || (isMigration && tokenSelected === 'ocean')
const showAgix = !isMigration || (isMigration && tokenSelected === 'agix')
return (
<>
<Result
token={getTokenBySymbol('OCEAN')}
amount={amountToOceanUniswap || amountToOcean}
amountAsi={(amountToOceanUniswap || amountToOcean) * ratioOceanToAsi}
amountFiat={
(amountToOceanUniswap || amountToOcean) *
ratioOceanToAsi *
prices.asi.usd
}
amountOriginalFiat={
(amountToOceanUniswap || amountToOcean) * prices.ocean.usd
}
isValidating={isValidatingToOcean || isValidatingPrices}
isLoading={isLoadingToOcean || isLoadingPrices}
/>
{showOcean ? (
<Result
token={getTokenBySymbol('OCEAN')}
amount={amountToOceanUniswap || amountToOcean}
amountAsi={(amountToOceanUniswap || amountToOcean) * ratioOceanToAsi}
amountFiat={
(amountToOceanUniswap || amountToOcean) *
ratioOceanToAsi *
prices.asi.usd
}
amountOriginalFiat={
(amountToOceanUniswap || amountToOcean) * prices.ocean.usd
}
isValidating={isValidatingToOcean || isValidatingPrices}
isLoading={isLoadingToOcean || isLoadingPrices}
/>
) : null}
<Result
token={getTokenBySymbol('AGIX')}
amount={amountToAgixUniswap || amountToAgix}
amountAsi={(amountToAgixUniswap || amountToAgix) * ratioAgixToAsi}
amountFiat={
(amountToAgixUniswap || amountToAgix) *
ratioAgixToAsi *
prices.asi.usd
}
amountOriginalFiat={
(amountToAgixUniswap || amountToAgix) * prices.agix.usd
}
isValidating={isValidatingToAgix || isValidatingPrices}
isLoading={isLoadingToAgix || isLoadingPrices}
/>
{showAgix ? (
<Result
token={getTokenBySymbol('AGIX')}
amount={amountToAgixUniswap || amountToAgix}
amountAsi={(amountToAgixUniswap || amountToAgix) * ratioAgixToAsi}
amountFiat={
(amountToAgixUniswap || amountToAgix) *
ratioAgixToAsi *
prices.asi.usd
}
amountOriginalFiat={
(amountToAgixUniswap || amountToAgix) * prices.agix.usd
}
isValidating={isValidatingToAgix || isValidatingPrices}
isLoading={isLoadingToAgix || isLoadingPrices}
/>
) : null}
<Result
token={getTokenBySymbol('FET')}