Commit 1f62cdf7 authored by Justin Domingue's avatar Justin Domingue Committed by GitHub

fix: invert selected range on RateToggle instead of clearing inputs (#2078)

parent 701e8fe1
...@@ -609,8 +609,8 @@ export default function AddLiquidity({ ...@@ -609,8 +609,8 @@ export default function AddLiquidity({
currencyA={baseCurrency} currencyA={baseCurrency}
currencyB={quoteCurrency} currencyB={quoteCurrency}
handleRateToggle={() => { handleRateToggle={() => {
onLeftRangeInput('') onLeftRangeInput((invertPrice ? priceLower : priceUpper?.invert())?.toSignificant(6) ?? '')
onRightRangeInput('') onRightRangeInput((invertPrice ? priceUpper : priceLower?.invert())?.toSignificant(6) ?? '')
history.push( history.push(
`/add/${currencyIdB as string}/${currencyIdA as string}${feeAmount ? '/' + feeAmount : ''}` `/add/${currencyIdB as string}/${currencyIdA as string}${feeAmount ? '/' + feeAmount : ''}`
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment