Skip to content

Commit 8948d5a

Browse files
committed
fixed low gas when loading transactionOptions from Json
1 parent 2d79524 commit 8948d5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/web3swift/Web3/Web3+Options.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public struct TransactionOptions {
125125
public static func fromJSON(_ json: [String: Any]) -> TransactionOptions? {
126126
var options = TransactionOptions()
127127
if let gas = json["gas"] as? String, let gasBiguint = BigUInt(gas.stripHexPrefix().lowercased(), radix: 16) {
128-
options.gasLimit = .limited(gasBiguint)
128+
options.gasLimit = .manual(gasBiguint)
129129
} else if let gasLimit = json["gasLimit"] as? String, let gasgasLimitBiguint = BigUInt(gasLimit.stripHexPrefix().lowercased(), radix: 16) {
130130
options.gasLimit = .limited(gasgasLimitBiguint)
131131
} else {

0 commit comments

Comments
 (0)