mirror of
https://github.com/kremalicious/asi-calculator.git
synced 2024-12-22 17:33:18 +01:00
simplify logic in Buy strategy
This commit is contained in:
parent
e73022c875
commit
d1adc49455
@ -22,43 +22,29 @@ export function Buy() {
|
|||||||
</h3>
|
</h3>
|
||||||
<Result
|
<Result
|
||||||
token={getTokenBySymbol('OCEAN')}
|
token={getTokenBySymbol('OCEAN')}
|
||||||
amount={prices.ocean ? debouncedAmount / prices.ocean : 0}
|
amount={debouncedAmount / prices.ocean}
|
||||||
amountAsi={
|
amountAsi={(debouncedAmount / prices.ocean) * ratioOceanToAsi}
|
||||||
prices.ocean ? (debouncedAmount / prices.ocean) * ratioOceanToAsi : 0
|
|
||||||
}
|
|
||||||
amountFiat={
|
amountFiat={
|
||||||
prices.ocean
|
(debouncedAmount / prices.ocean) * ratioOceanToAsi * prices.asi
|
||||||
? (debouncedAmount / prices.ocean) * ratioOceanToAsi * prices.asi
|
|
||||||
: 0
|
|
||||||
}
|
}
|
||||||
isValidating={isValidating}
|
isValidating={isValidating}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
/>
|
/>
|
||||||
<Result
|
<Result
|
||||||
token={getTokenBySymbol('AGIX')}
|
token={getTokenBySymbol('AGIX')}
|
||||||
amount={prices.agix ? debouncedAmount / prices.agix : 0}
|
amount={debouncedAmount / prices.agix}
|
||||||
amountAsi={
|
amountAsi={(debouncedAmount / prices.agix) * ratioAgixToAsi}
|
||||||
prices.agix ? (debouncedAmount / prices.agix) * ratioAgixToAsi : 0
|
|
||||||
}
|
|
||||||
amountFiat={
|
amountFiat={
|
||||||
prices.agix
|
(debouncedAmount / prices.agix) * ratioAgixToAsi * prices.asi
|
||||||
? (debouncedAmount / prices.agix) * ratioAgixToAsi * prices.asi
|
|
||||||
: 0
|
|
||||||
}
|
}
|
||||||
isValidating={isValidating}
|
isValidating={isValidating}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
/>
|
/>
|
||||||
<Result
|
<Result
|
||||||
token={getTokenBySymbol('FET')}
|
token={getTokenBySymbol('FET')}
|
||||||
amount={prices.fet ? debouncedAmount / prices.fet : 0}
|
amount={debouncedAmount / prices.fet}
|
||||||
amountAsi={
|
amountAsi={(debouncedAmount / prices.fet) * ratioFetToAsi}
|
||||||
prices.fet ? (debouncedAmount / prices.fet) * ratioFetToAsi : 0
|
amountFiat={(debouncedAmount / prices.fet) * ratioFetToAsi * prices.asi}
|
||||||
}
|
|
||||||
amountFiat={
|
|
||||||
prices.fet
|
|
||||||
? (debouncedAmount / prices.fet) * ratioFetToAsi * prices.asi
|
|
||||||
: 0
|
|
||||||
}
|
|
||||||
isValidating={isValidating}
|
isValidating={isValidating}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user