1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-28 09:58:23 +00:00

SendFormActions: setDefaultGesLimit - token or coin value fix

This commit is contained in:
Szymon Lesisz 2018-11-21 14:25:55 +01:00 committed by Szymon Lesisz
parent fc50202f6a
commit a944b9287e

View File

@ -389,14 +389,17 @@ export const setDefaultGasLimit = (): ThunkAction => (dispatch: Dispatch, getSta
const { network } = getState().selectedAccount;
if (!network) return;
const isToken = state.currency !== state.networkSymbol;
const gasLimit = isToken ? network.defaultGasLimitTokens.toString() : network.defaultGasLimit.toString();
dispatch({
type: SEND.CHANGE,
state: {
...state,
calculatingGasLimit: false,
untouched: false,
touched: { ...state.touched, gasLimit: true },
gasLimit: network.defaultGasLimit.toString(),
touched: { ...state.touched, gasLimit: false },
gasLimit,
},
});
};