Merge pull request #569 from trezor/fix/remove-console-errors

Fix/hide some errors that are too frequent
pull/570/head
Vladimir Volek 5 years ago committed by GitHub
commit 01ddcf5349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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';
}
};

@ -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';
}
};

@ -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';
}
};

Loading…
Cancel
Save