Skip to content

Commit

Permalink
fix(suite): send form fiat token decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasklim committed Jan 16, 2025
1 parent 6c35284 commit d8027a8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ export const FiatInput = ({
const outputError = errors.outputs ? errors.outputs[outputId] : undefined;
const error = outputError ? outputError.fiat : undefined;
const fiatValue = getDefaultValue(fiatInputName, output.fiat || '');
const tokenValue = getDefaultValue(tokenInputName, output.token);
const tokenContractAddress = getDefaultValue(tokenInputName, output.token);

const amountValue = getDefaultValue(amountInputName, '');
const token = findToken(account.tokens, tokenValue);
const token = findToken(account.tokens, tokenContractAddress);

const currencyValue = watch(currencyInputName);

Expand Down Expand Up @@ -107,7 +108,7 @@ export const FiatInput = ({
const inputState = isLowAnonymity ? 'warning' : getInputState(errorToDisplay);
const bottomText = isLowAnonymity ? null : errorToDisplay?.message;

const handleChange = (value: string) => handleFiatChange({ outputId, value });
const handleChange = (value: string) => handleFiatChange({ outputId, token, value });

const rules = {
required: translationString('AMOUNT_IS_NOT_SET'),
Expand Down

0 comments on commit d8027a8

Please sign in to comment.