on master help sign in
Always suggest whole gwei amounts
54bf1d5Fang
src/lib/getSuggestedGasPrice.js+1−1
@@ -22,7 +22,7 @@ export default async function getSuggestedGasPrice(networkType) {
22
22
23 // ethgasstation returns values in floating point, one order of magitude
23 // ethgasstation returns values in floating point, one order of magitude
24 // more than gwei. see: https://docs.ethgasstation.info
24 // more than gwei. see: https://docs.ethgasstation.info
25− const suggestedGasPrice = json.fast / 10; // to gwei
25+ const suggestedGasPrice = Math.ceil(json.fast / 10); // to gwei
26
26
27 // we don't want to charge users more than our default 20 gwei
27 // we don't want to charge users more than our default 20 gwei
28 return Math.min(suggestedGasPrice, DEFAULT_GAS_PRICE_GWEI);
28 return Math.min(suggestedGasPrice, DEFAULT_GAS_PRICE_GWEI);