chore: disabling exact output for fot tokens (#7550)

* chore: disabling exact output for fot tokens

* fixing currency symbol
This commit is contained in:
Jack Short 2023-11-08 12:28:23 -05:00 committed by GitHub
parent 245d0eed06
commit 0e87c38548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -710,10 +710,14 @@ export function Swap({
loading={independentField === Field.INPUT && routeIsSyncing} loading={independentField === Field.INPUT && routeIsSyncing}
numericalInputSettings={{ numericalInputSettings={{
// We disable numerical input here if the selected token has tax, since we cannot guarantee exact_outputs for FOT tokens // We disable numerical input here if the selected token has tax, since we cannot guarantee exact_outputs for FOT tokens
disabled: outputTokenHasTax, disabled: inputTokenHasTax || outputTokenHasTax,
// Focus the input currency panel if the user tries to type into the disabled output currency panel // Focus the input currency panel if the user tries to type into the disabled output currency panel
onDisabledClick: () => inputCurrencyNumericalInputRef.current?.focus(), onDisabledClick: () => inputCurrencyNumericalInputRef.current?.focus(),
disabledTooltipBody: <OutputTaxTooltipBody currencySymbol={currencies[Field.OUTPUT]?.symbol} />, disabledTooltipBody: (
<OutputTaxTooltipBody
currencySymbol={currencies[inputTokenHasTax ? Field.INPUT : Field.OUTPUT]?.symbol}
/>
),
}} }}
/> />
</Trace> </Trace>