mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-01 03:40:53 +00:00
SendFormActions: setDefaultGesLimit - token or coin value fix
This commit is contained in:
parent
fc50202f6a
commit
a944b9287e
@ -389,14 +389,17 @@ export const setDefaultGasLimit = (): ThunkAction => (dispatch: Dispatch, getSta
|
|||||||
const { network } = getState().selectedAccount;
|
const { network } = getState().selectedAccount;
|
||||||
if (!network) return;
|
if (!network) return;
|
||||||
|
|
||||||
|
const isToken = state.currency !== state.networkSymbol;
|
||||||
|
const gasLimit = isToken ? network.defaultGasLimitTokens.toString() : network.defaultGasLimit.toString();
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: SEND.CHANGE,
|
type: SEND.CHANGE,
|
||||||
state: {
|
state: {
|
||||||
...state,
|
...state,
|
||||||
calculatingGasLimit: false,
|
calculatingGasLimit: false,
|
||||||
untouched: false,
|
untouched: false,
|
||||||
touched: { ...state.touched, gasLimit: true },
|
touched: { ...state.touched, gasLimit: false },
|
||||||
gasLimit: network.defaultGasLimit.toString(),
|
gasLimit,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user