File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Sources/web3swift/Transaction Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -47,17 +47,12 @@ public struct TransactionOptions {
47
47
public var gasPrice : GasPricePolicy ?
48
48
49
49
// new gas parameters for EIP-1559 support
50
- public enum MaxFeePerGasPolicy {
50
+ public enum FeePerGasPolicy {
51
51
case automatic
52
52
case manual( BigUInt )
53
53
}
54
- public var maxFeePerGas : MaxFeePerGasPolicy ?
55
-
56
- public enum MaxPriorityFeePerGasPolicy {
57
- case automatic
58
- case manual( BigUInt )
59
- }
60
- public var maxPriorityFeePerGas : MaxPriorityFeePerGasPolicy ?
54
+ public var maxFeePerGas : FeePerGasPolicy ?
55
+ public var maxPriorityFeePerGas : FeePerGasPolicy ?
61
56
62
57
/// The value transferred for the transaction in wei, also the endowment if it’s a contract-creation transaction.
63
58
public var value : BigUInt ?
@@ -130,12 +125,10 @@ public struct TransactionOptions {
130
125
public func resolveGasLimit( _ suggestedByNode: BigUInt ) -> BigUInt {
131
126
guard let gasLimitPolicy = self . gasLimit else { return suggestedByNode }
132
127
switch gasLimitPolicy {
133
- case . automatic:
128
+ case . automatic, . withMargin :
134
129
return suggestedByNode
135
130
case . manual( let value) :
136
131
return value
137
- case . withMargin:
138
- return suggestedByNode
139
132
case . limited( let limit) :
140
133
if limit <= suggestedByNode {
141
134
return suggestedByNode
You can’t perform that action at this time.
0 commit comments