Skip to content

Commit a2ecec6

Browse files
authored
add rust shielder action tx hash (#72)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added the ability to retrieve transaction hashes for all account operations (account creation, deposits, and withdrawals). <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent c56da8c commit a2ecec6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/shielder-account/src/shielder_action.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ impl ShielderAction {
121121
}
122122
}
123123
}
124+
125+
pub fn tx_hash(&self) -> TxHash {
126+
match self {
127+
Self::NewAccount(data) | Self::Deposit(data) | Self::Withdraw { data, .. } => {
128+
data.tx_hash
129+
}
130+
}
131+
}
124132
}
125133

126134
#[derive(Clone, Eq, PartialEq, Debug, Deserialize, Serialize)]

0 commit comments

Comments
 (0)