mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Handle a negative gas fee (#13511)
This commit is contained in:
parent
a7eaf1bd7f
commit
9731e5fbeb
@ -51,8 +51,10 @@ function calculateGasEstimateWithRefund(
|
||||
estimatedRefund,
|
||||
10,
|
||||
);
|
||||
const isMaxGasMinusRefundNegative = maxGasMinusRefund.lt(0);
|
||||
|
||||
const gasEstimateWithRefund = maxGasMinusRefund.lt(estimatedGas, 16)
|
||||
const gasEstimateWithRefund =
|
||||
!isMaxGasMinusRefundNegative && maxGasMinusRefund.lt(estimatedGas, 16)
|
||||
? maxGasMinusRefund.toString(16)
|
||||
: estimatedGas;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user