Do not recall gasPrice when it is already set
This commit is contained in:
parent
29beb93ea7
commit
1cc9fcf64d
@ -127,17 +127,18 @@ export abstract class AbstractSigner<P extends null | Provider = null | Provider
|
||||
pop.type = 2;
|
||||
|
||||
} else if (pop.type === 0 || pop.type === 1) {
|
||||
// Explicit Legacy or EIP-2930 transaction
|
||||
|
||||
// We need to get fee data to determine things
|
||||
const feeData = await provider.getFeeData();
|
||||
|
||||
assert(feeData.gasPrice != null, "network does not support gasPrice", "UNSUPPORTED_OPERATION", {
|
||||
operation: "getGasPrice" });
|
||||
|
||||
// Populate missing gasPrice
|
||||
if (pop.gasPrice == null) { pop.gasPrice = feeData.gasPrice; }
|
||||
|
||||
if (pop.gasPrice == null) {
|
||||
// Explicit Legacy or EIP-2930 transaction
|
||||
|
||||
// We need to get fee data to determine things
|
||||
const feeData = await provider.getFeeData();
|
||||
|
||||
assert(feeData.gasPrice != null, "network does not support gasPrice", "UNSUPPORTED_OPERATION", {
|
||||
operation: "getGasPrice" });
|
||||
|
||||
// Populate missing gasPrice
|
||||
pop.gasPrice = feeData.gasPrice;
|
||||
}
|
||||
} else {
|
||||
|
||||
// We need to get fee data to determine things
|
||||
|
Loading…
Reference in New Issue
Block a user