mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-13 11:58:58 +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';
|
||||
} else {
|
||||
const gl: BigNumber = new BigNumber(fee);
|
||||
if (gl.lessThan(10)) {
|
||||
if (gl.lessThan(network.fee.minFee)) {
|
||||
state.errors.fee = 'Fee is below recommended';
|
||||
} else if (gl.greaterThan(network.fee.maxFee)) {
|
||||
state.errors.fee = 'Fee is above recommended';
|
||||
}
|
||||
}
|
||||
return state;
|
||||
|
Loading…
Reference in New Issue
Block a user