1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-29 02:18:06 +00:00

faster conversion to string for ripple

This commit is contained in:
slowbackspace 2019-01-08 11:50:30 +01:00
parent cc5d7a9b66
commit 83abbd9ac3

View File

@ -237,7 +237,7 @@ export const feeValidation = ($state: State): PayloadAction<State> => (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';
}