@@ -232,15 +232,18 @@ mod tests {
232
232
233
233
#[ test]
234
234
fn test_order_cancel_encoding ( ) {
235
- let cancel= OrderCancel {
235
+ let cancel = OrderCancel {
236
236
order_bytes : hex:: decode ( "6c449988e2f33302803c93f8287dc1d8cb33848a" ) . unwrap ( ) ,
237
237
} ;
238
- assert ! ( cancel. rlp_bytes( ) ==hex:: decode( "d5946c449988e2f33302803c93f8287dc1d8cb33848a" ) . unwrap( ) ) ;
238
+ assert ! (
239
+ cancel. rlp_bytes( )
240
+ == hex:: decode( "d5946c449988e2f33302803c93f8287dc1d8cb33848a" ) . unwrap( )
241
+ ) ;
239
242
}
240
243
241
244
#[ test]
242
- fn test_swap_order_encoding ( ) {
243
- let order =SwapOrder {
245
+ fn test_swap_order_encoding ( ) {
246
+ let order = SwapOrder {
244
247
id : 1 ,
245
248
emitter : "0xbe6452d4d6c61cee97d3" . to_string ( ) ,
246
249
src_nid : "Ethereum" . to_string ( ) ,
@@ -255,7 +258,7 @@ mod tests {
255
258
} ;
256
259
assert ! ( order. rlp_bytes( ) ==hex:: decode( "f8a601963078626536343532643464366336316365653937643388457468657265756d87506f6c79676f6e983078336533366564646436356532333932323265376536379c30786432633632313862383735343537613431623666623739363465a43078313433353533343065383537393132313838623766323032643535303232323438378203e89a307839316134373238623531373438346630663631306465376282038480" ) . unwrap( ) ) ;
257
260
258
- let order =SwapOrder {
261
+ let order = SwapOrder {
259
262
id : 1 ,
260
263
emitter : "0xbe6452d4d6c61cee97d3" . to_string ( ) ,
261
264
src_nid : "Ethereum" . to_string ( ) ,
@@ -265,11 +268,9 @@ mod tests {
265
268
token : "0x14355340e857912188b7f202d550222487" . to_string ( ) ,
266
269
amount : 100000 * 10000000000000000000000 ,
267
270
to_token : "0x91a4728b517484f0f610de7b" . to_string ( ) ,
268
- to_amount : 900 * 10000000 ,
271
+ to_amount : 900 * 10000000 ,
269
272
data : hex:: decode ( "6c449988e2f33302803c93f8287dc1d8cb33848a" ) . unwrap ( ) ,
270
273
} ;
271
274
assert ! ( order. rlp_bytes( ) ==hex:: decode( "f8c701963078626536343532643464366336316365653937643388457468657265756d87506f6c79676f6e983078336533366564646436356532333932323265376536379c30786432633632313862383735343537613431623666623739363465a43078313433353533343065383537393132313838623766323032643535303232323438378c033b2e3c9fd0803ce80000009a3078393161343732386235313734383466306636313064653762850218711a00946c449988e2f33302803c93f8287dc1d8cb33848a" ) . unwrap( ) ) ;
272
-
273
-
274
275
}
275
276
}
0 commit comments