mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-01 04:38:15 +00:00
validate ripple fee (min/max value)
This commit is contained in:
parent
7d9cbf7cbe
commit
96fd05676f
@ -221,8 +221,10 @@ export const feeValidation = ($state: State): PayloadAction<State> => (dispatch:
|
|||||||
state.errors.fee = 'Fee must be an absolute number';
|
state.errors.fee = 'Fee must be an absolute number';
|
||||||
} else {
|
} else {
|
||||||
const gl: BigNumber = new BigNumber(fee);
|
const gl: BigNumber = new BigNumber(fee);
|
||||||
if (gl.lessThan(10)) {
|
if (gl.lessThan(network.fee.minFee)) {
|
||||||
state.errors.fee = 'Fee is below recommended';
|
state.errors.fee = 'Fee is below recommended';
|
||||||
|
} else if (gl.greaterThan(network.fee.maxFee)) {
|
||||||
|
state.errors.fee = 'Fee is above recommended';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
Loading…
Reference in New Issue
Block a user