@@ -166,18 +166,18 @@ public struct EthereumTransaction: CustomStringConvertible {
166166 public func encode( forSignature: Bool = false , chainID: BigUInt ? = nil ) -> Data ? {
167167 if ( forSignature) {
168168 if chainID != nil {
169- let fields = [ self . nonce, self . gasPrice, self . gasLimit, self . to. addressData, self . value, self . data, chainID!, BigUInt ( 0 ) , BigUInt ( 0 ) ] as [ AnyObject ]
169+ let fields = [ self . nonce, self . gasPrice, self . gasLimit, self . to. addressData, self . value! , self . data, chainID!, BigUInt ( 0 ) , BigUInt ( 0 ) ] as [ AnyObject ]
170170 return RLP . encode ( fields)
171171 }
172172 else if self . chainID != nil {
173- let fields = [ self . nonce, self . gasPrice, self . gasLimit, self . to. addressData, self . value, self . data, self . chainID!, BigUInt ( 0 ) , BigUInt ( 0 ) ] as [ AnyObject ]
173+ let fields = [ self . nonce, self . gasPrice, self . gasLimit, self . to. addressData, self . value! , self . data, self . chainID!, BigUInt ( 0 ) , BigUInt ( 0 ) ] as [ AnyObject ]
174174 return RLP . encode ( fields)
175175 } else {
176- let fields = [ self . nonce, self . gasPrice, self . gasLimit, self . to. addressData, self . value, self . data] as [ AnyObject ]
176+ let fields = [ self . nonce, self . gasPrice, self . gasLimit, self . to. addressData, self . value! , self . data] as [ AnyObject ]
177177 return RLP . encode ( fields)
178178 }
179179 } else {
180- let fields = [ self . nonce, self . gasPrice, self . gasLimit, self . to. addressData, self . value, self . data, self . v, self . r, self . s] as [ AnyObject ]
180+ let fields = [ self . nonce, self . gasPrice, self . gasLimit, self . to. addressData, self . value! , self . data, self . v, self . r, self . s] as [ AnyObject ]
181181 return RLP . encode ( fields)
182182 }
183183 }
0 commit comments