Skip to content

Commit 3737f78

Browse files
committed
fix(suite): send form fiat token decimals
1 parent 4c73755 commit 3737f78

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/suite/src/views/wallet/send/Outputs/Amount/FiatInput.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ export const FiatInput = ({
6969
const outputError = errors.outputs ? errors.outputs[outputId] : undefined;
7070
const error = outputError ? outputError.fiat : undefined;
7171
const fiatValue = getDefaultValue(fiatInputName, output.fiat || '');
72-
const tokenValue = getDefaultValue(tokenInputName, output.token);
72+
const tokenContractAddress = getDefaultValue(tokenInputName, output.token);
73+
7374
const amountValue = getDefaultValue(amountInputName, '');
74-
const token = findToken(account.tokens, tokenValue);
75+
const token = findToken(account.tokens, tokenContractAddress);
7576

7677
const currencyValue = watch(currencyInputName);
7778

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

110-
const handleChange = (value: string) => handleFiatChange({ outputId, value });
111+
const handleChange = (value: string) => handleFiatChange({ outputId, token, value });
111112

112113
const rules = {
113114
required: translationString('AMOUNT_IS_NOT_SET'),

0 commit comments

Comments
 (0)