File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ use primitives::H256;
2020use rlp:: RlpStream ;
2121
2222use super :: Action ;
23- use super :: ShardTransaction ;
23+ use super :: { AssetWrapCCCOutput , ShardTransaction } ;
2424
2525#[ derive( Debug , Clone , PartialEq , Eq ) ]
2626pub struct Transaction {
@@ -52,8 +52,26 @@ impl Transaction {
5252 }
5353
5454 pub fn tracker ( & self ) -> Option < H256 > {
55- let t: Option < ShardTransaction > = self . action . clone ( ) . into ( ) ;
56- t. map ( |t| t. tracker ( ) )
55+ let shard_tx = match self . action . clone ( ) {
56+ Action :: WrapCCC {
57+ shard_id,
58+ lock_script_hash,
59+ parameters,
60+ quantity,
61+ ..
62+ } => Some ( ShardTransaction :: WrapCCC {
63+ network_id : self . network_id ,
64+ shard_id,
65+ tx_hash : self . hash ( ) ,
66+ output : AssetWrapCCCOutput {
67+ lock_script_hash,
68+ parameters,
69+ quantity,
70+ } ,
71+ } ) ,
72+ other_actions => other_actions. into ( ) ,
73+ } ;
74+ shard_tx. map ( |t| t. tracker ( ) )
5775 }
5876 pub fn is_master_key_allowed ( & self ) -> bool {
5977 match self . action {
You can’t perform that action at this time.
0 commit comments