@@ -71,16 +71,16 @@ extension web3.BrowserFunctions {
71
71
72
72
public func sendTransaction( _ transactionJSON: [ String : Any ] , password: String = " web3swift " ) -> [ String : Any ] ? {
73
73
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)
84
84
} catch { return nil }
85
85
}
86
86
0 commit comments