1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Allow higher precision gas prices in the send flow (#11652)

* Allow higher precision gas prices in the send flow

* Fix gas duck test

* Allow more decimals in transaction breakdown gas price
This commit is contained in:
Dan J Miller 2021-07-28 16:08:54 -02:30 committed by GitHub
parent 3010c1b565
commit 404f876026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -95,6 +95,7 @@ export default class TransactionBreakdown extends PureComponent {
currency={nativeCurrency} currency={nativeCurrency}
denomination={GWEI} denomination={GWEI}
value={gasPrice} value={gasPrice}
numberOfDecimals={9}
hideLabel hideLabel
/> />
)} )}

View File

@ -198,7 +198,7 @@ describe('Gas Duck', () => {
{ {
type: SET_BASIC_GAS_ESTIMATE_DATA, type: SET_BASIC_GAS_ESTIMATE_DATA,
value: { value: {
average: 0.0482, average: 0.048199313,
}, },
}, },
]); ]);

View File

@ -173,7 +173,7 @@ async function fetchEthGasPriceEstimates(state) {
const gasPrice = await global.eth.gasPrice(); const gasPrice = await global.eth.gasPrice();
const averageGasPriceInDecGWEI = getValueFromWeiHex({ const averageGasPriceInDecGWEI = getValueFromWeiHex({
value: gasPrice.toString(16), value: gasPrice.toString(16),
numberOfDecimals: 4, numberOfDecimals: 9,
toDenomination: 'GWEI', toDenomination: 'GWEI',
}); });
const basicEstimates = { const basicEstimates = {