From 96fd05676f7a4082c13e37d1aea439391d86e43c Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Thu, 3 Jan 2019 15:37:08 +0100 Subject: [PATCH] validate ripple fee (min/max value) --- src/actions/ripple/SendFormValidationActions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/actions/ripple/SendFormValidationActions.js b/src/actions/ripple/SendFormValidationActions.js index 2816085b..db5131fa 100644 --- a/src/actions/ripple/SendFormValidationActions.js +++ b/src/actions/ripple/SendFormValidationActions.js @@ -221,8 +221,10 @@ export const feeValidation = ($state: State): PayloadAction => (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;