@@ -166,18 +166,18 @@ public struct EthereumTransaction: CustomStringConvertible {
166
166
public func encode( forSignature: Bool = false , chainID: BigUInt ? = nil ) -> Data ? {
167
167
if ( forSignature) {
168
168
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 ]
170
170
return RLP . encode ( fields)
171
171
}
172
172
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 ]
174
174
return RLP . encode ( fields)
175
175
} 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 ]
177
177
return RLP . encode ( fields)
178
178
}
179
179
} 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 ]
181
181
return RLP . encode ( fields)
182
182
}
183
183
}
0 commit comments