diff --git a/src/actions/ethereum/SendFormValidationActions.js b/src/actions/ethereum/SendFormValidationActions.js index 23102150..875a23a0 100644 --- a/src/actions/ethereum/SendFormValidationActions.js +++ b/src/actions/ethereum/SendFormValidationActions.js @@ -408,7 +408,7 @@ export const calculateFee = (gasPrice: string, gasLimit: string): string => { 'ether' ); } catch (error) { - console.error(error); + // TODO: empty input throws this error. return '0'; } }; @@ -422,7 +422,7 @@ export const calculateTotal = (amount: string, gasPrice: string, gasLimit: strin } return bAmount.plus(calculateFee(gasPrice, gasLimit)).toFixed(); } catch (error) { - console.error(error); + // TODO: empty input throws this error. return '0'; } }; diff --git a/src/actions/ripple/SendFormValidationActions.js b/src/actions/ripple/SendFormValidationActions.js index d15a432e..33ddcc06 100644 --- a/src/actions/ripple/SendFormValidationActions.js +++ b/src/actions/ripple/SendFormValidationActions.js @@ -383,7 +383,7 @@ const calculateTotal = (amount: string, fee: string): string => { } return bAmount.plus(fee).toFixed(); } catch (error) { - console.error(error); + // TODO: empty input throws this error. return '0'; } }; diff --git a/src/utils/formatUtils.js b/src/utils/formatUtils.js index 1d8278ec..392ef109 100644 --- a/src/utils/formatUtils.js +++ b/src/utils/formatUtils.js @@ -11,7 +11,6 @@ export const toDecimalAmount = (amount: string | number, decimals: number): stri } return bAmount.div(10 ** decimals).toString(10); } catch (error) { - console.error(error); return '0'; } }; @@ -25,7 +24,6 @@ export const fromDecimalAmount = (amount: string | number, decimals: number): st } return bAmount.times(10 ** decimals).toString(10); } catch (error) { - console.error(error); return '0'; } };