From 83abbd9ac3742e3326d81d5a25984164d9a900ed Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 8 Jan 2019 11:50:30 +0100 Subject: [PATCH] faster conversion to string for ripple --- src/actions/ripple/SendFormValidationActions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions/ripple/SendFormValidationActions.js b/src/actions/ripple/SendFormValidationActions.js index db5131fa..1e529763 100644 --- a/src/actions/ripple/SendFormValidationActions.js +++ b/src/actions/ripple/SendFormValidationActions.js @@ -237,7 +237,7 @@ export const feeValidation = ($state: State): PayloadAction => (dispatch: const calculateTotal = (amount: string, fee: string): string => { try { - return new BigNumber(amount).plus(fee).toString(10); + return new BigNumber(amount).plus(fee).toFixed(); } catch (error) { return '0'; } @@ -248,7 +248,7 @@ const calculateMaxAmount = (balance: BigNumber, fee: string): string => { // TODO - minus pendings const max = balance.minus(fee); if (max.lessThan(0)) return '0'; - return max.toString(10); + return max.toFixed(); } catch (error) { return '0'; }