Skip to content

Commit 969aaa7

Browse files
committed
missed revert of cosmetic change
1 parent 21cca21 commit 969aaa7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Sources/web3swift/HookedFunctions/Web3+BrowserFunctions.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ extension web3.BrowserFunctions {
7171

7272
public func sendTransaction(_ transactionJSON: [String: Any], password: String = "web3swift") -> [String: Any]? {
7373
do {
74-
let jsonData: Data = try JSONSerialization.data(withJSONObject: transactionJSON, options: [])
75-
let transaction: EthereumTransaction = try JSONDecoder().decode(EthereumTransaction.self, from: jsonData)
76-
let options: TransactionOptions = try JSONDecoder().decode(TransactionOptions.self, from: jsonData)
77-
var transactionOptions = TransactionOptions()
78-
transactionOptions.from = options.from
79-
transactionOptions.to = options.to
80-
transactionOptions.value = options.value ?? 0
81-
transactionOptions.gasLimit = options.gasLimit ?? .automatic
82-
transactionOptions.gasPrice = options.gasPrice ?? .automatic
83-
return self.sendTransaction(transaction, transactionOptions: transactionOptions, password: password)
74+
let jsonData: Data = try JSONSerialization.data(withJSONObject: transactionJSON, options: [])
75+
let transaction: EthereumTransaction = try JSONDecoder().decode(EthereumTransaction.self, from: jsonData)
76+
let options: TransactionOptions = try JSONDecoder().decode(TransactionOptions.self, from: jsonData)
77+
var transactionOptions = TransactionOptions()
78+
transactionOptions.from = options.from
79+
transactionOptions.to = options.to
80+
transactionOptions.value = options.value ?? 0
81+
transactionOptions.gasLimit = options.gasLimit ?? .automatic
82+
transactionOptions.gasPrice = options.gasPrice ?? .automatic
83+
return self.sendTransaction(transaction, transactionOptions: transactionOptions, password: password)
8484
} catch { return nil }
8585
}
8686

0 commit comments

Comments
 (0)