diff --git a/src/actions/DiscoveryActions.js b/src/actions/DiscoveryActions.js index c3734327..06ee9e3e 100644 --- a/src/actions/DiscoveryActions.js +++ b/src/actions/DiscoveryActions.js @@ -175,6 +175,7 @@ const begin = (device: TrezorDevice, networkName: string): AsyncAction => async throw new Error(`DiscoveryActions.begin: Unknown network type: ${network.type}`); } } catch (error) { + console.error(error); dispatch({ type: NOTIFICATION.ADD, payload: { @@ -258,6 +259,7 @@ const discoverAccount = (device: TrezorDevice, discoveryProcess: Discovery): Asy return; } + console.error(error); dispatch({ type: DISCOVERY.STOP, device, diff --git a/src/actions/LocalStorageActions.js b/src/actions/LocalStorageActions.js index c44cdb33..1148ed8e 100644 --- a/src/actions/LocalStorageActions.js +++ b/src/actions/LocalStorageActions.js @@ -205,6 +205,7 @@ const loadJSON = (): AsyncAction => async (dispatch: Dispatch): Promise => ERC20Abi, }); } catch (error) { + console.error(error); dispatch({ type: STORAGE.ERROR, error, diff --git a/src/actions/TrezorConnectActions.js b/src/actions/TrezorConnectActions.js index e60931ab..446c59b6 100644 --- a/src/actions/TrezorConnectActions.js +++ b/src/actions/TrezorConnectActions.js @@ -178,6 +178,7 @@ export const init = (): AsyncAction => async ( }, }); } catch (error) { + console.error(error); dispatch({ type: CONNECT.INITIALIZATION_ERROR, error, diff --git a/src/actions/Web3Actions.js b/src/actions/Web3Actions.js index f78fa8c3..599bc1e8 100644 --- a/src/actions/Web3Actions.js +++ b/src/actions/Web3Actions.js @@ -116,6 +116,7 @@ export const initWeb3 = ( const otherWeb3 = await dispatch(initWeb3(network, urlIndex + 1)); resolve(otherWeb3); } catch (error) { + console.error(error); reject(error); } } diff --git a/src/actions/ethereum/BlockchainActions.js b/src/actions/ethereum/BlockchainActions.js index 928f1474..9ceb83e4 100644 --- a/src/actions/ethereum/BlockchainActions.js +++ b/src/actions/ethereum/BlockchainActions.js @@ -61,6 +61,7 @@ export const getGasPrice = ( const gasPrice = await dispatch(Web3Actions.getCurrentGasPrice(network)); return gasPrice === '0' ? new BigNumber(defaultGasPrice) : new BigNumber(gasPrice); } catch (error) { + console.error(error); return new BigNumber(defaultGasPrice); } }; diff --git a/src/actions/ethereum/SendFormActions.js b/src/actions/ethereum/SendFormActions.js index 92877a12..471c8ede 100644 --- a/src/actions/ethereum/SendFormActions.js +++ b/src/actions/ethereum/SendFormActions.js @@ -819,6 +819,7 @@ export const onSend = (): AsyncAction => async ( }, }); } catch (error) { + console.error(error); dispatch({ type: NOTIFICATION.ADD, payload: { diff --git a/src/actions/ethereum/SendFormValidationActions.js b/src/actions/ethereum/SendFormValidationActions.js index 33aa0ec6..23102150 100644 --- a/src/actions/ethereum/SendFormValidationActions.js +++ b/src/actions/ethereum/SendFormValidationActions.js @@ -408,6 +408,7 @@ export const calculateFee = (gasPrice: string, gasLimit: string): string => { 'ether' ); } catch (error) { + console.error(error); return '0'; } }; @@ -421,6 +422,7 @@ export const calculateTotal = (amount: string, gasPrice: string, gasLimit: strin } return bAmount.plus(calculateFee(gasPrice, gasLimit)).toFixed(); } catch (error) { + console.error(error); return '0'; } }; @@ -437,6 +439,7 @@ export const calculateMaxAmount = ( if (max.isLessThan(0)) return '0'; return max.toFixed(); } catch (error) { + console.error(error); return '0'; } }; diff --git a/src/actions/ripple/SendFormValidationActions.js b/src/actions/ripple/SendFormValidationActions.js index 551be702..d15a432e 100644 --- a/src/actions/ripple/SendFormValidationActions.js +++ b/src/actions/ripple/SendFormValidationActions.js @@ -383,6 +383,7 @@ const calculateTotal = (amount: string, fee: string): string => { } return bAmount.plus(fee).toFixed(); } catch (error) { + console.error(error); return '0'; } }; @@ -394,6 +395,7 @@ const calculateMaxAmount = (balance: BigNumber, fee: string): string => { if (max.isLessThan(0)) return '0'; return max.toFixed(); } catch (error) { + console.error(error); return '0'; } }; diff --git a/src/services/CoingeckoService.js b/src/services/CoingeckoService.js index 5bdd1097..8ced20b3 100644 --- a/src/services/CoingeckoService.js +++ b/src/services/CoingeckoService.js @@ -62,6 +62,7 @@ const loadRateAction = (): AsyncAction => async ( }); } catch (error) { // ignore error + console.error(error); } await resolveAfter(50000); diff --git a/src/utils/formatUtils.js b/src/utils/formatUtils.js index 392ef109..1d8278ec 100644 --- a/src/utils/formatUtils.js +++ b/src/utils/formatUtils.js @@ -11,6 +11,7 @@ export const toDecimalAmount = (amount: string | number, decimals: number): stri } return bAmount.div(10 ** decimals).toString(10); } catch (error) { + console.error(error); return '0'; } }; @@ -24,6 +25,7 @@ export const fromDecimalAmount = (amount: string | number, decimals: number): st } return bAmount.times(10 ** decimals).toString(10); } catch (error) { + console.error(error); return '0'; } };