hide some errors that are too frequent

pull/569/head
slowbackspace 5 years ago
parent da086cf005
commit e100284c76

@ -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