File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,9 @@ export default class Transaction {
69
69
to : to && to . length > 0 ? new Address ( to ) : undefined ,
70
70
value : new BN ( value ) ,
71
71
data : data ?? emptyBuffer ,
72
- v : ! v ? .equals ( emptyBuffer ) ? new BN ( v ) : undefined ,
73
- r : ! r ? .equals ( emptyBuffer ) ? new BN ( r ) : undefined ,
74
- s : ! s ? .equals ( emptyBuffer ) ? new BN ( s ) : undefined ,
72
+ v : v && ! v . equals ( emptyBuffer ) ? new BN ( v ) : undefined ,
73
+ r : r && ! r . equals ( emptyBuffer ) ? new BN ( r ) : undefined ,
74
+ s : s && ! s . equals ( emptyBuffer ) ? new BN ( s ) : undefined ,
75
75
} ,
76
76
opts
77
77
)
Original file line number Diff line number Diff line change @@ -380,6 +380,12 @@ tape('[Transaction]: Basic functions', function (t) {
380
380
st . ok ( tx . isSigned ( ) )
381
381
tx = Transaction . fromRlpSerializedTx ( rawSigned )
382
382
st . ok ( tx . isSigned ( ) )
383
+
384
+ const signedValues = ( rlp . decode ( rawSigned ) as any ) as Buffer [ ]
385
+ tx = Transaction . fromValuesArray ( signedValues )
386
+ st . ok ( tx . isSigned ( ) )
387
+ tx = Transaction . fromValuesArray ( signedValues . slice ( 0 , 6 ) )
388
+ st . notOk ( tx . isSigned ( ) )
383
389
st . end ( )
384
390
} )
385
391
You can’t perform that action at this time.
0 commit comments