Skip to content

Commit e95fdc2

Browse files
authored
feat: Implement Deref for NonDelegateAction and format output (#119)
* feat: Implement Deref for NonDelegateAction and format output * Fix formatting of base64_signed_delegate_action output
1 parent e2d22ef commit e95fdc2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

types/src/transaction/delegate_action.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use std::ops::Deref;
12
use std::str::FromStr;
23

34
use base64::{prelude::BASE64_STANDARD, Engine};
@@ -21,6 +22,14 @@ impl TryFrom<Action> for NonDelegateAction {
2122
}
2223
}
2324

25+
impl Deref for NonDelegateAction {
26+
type Target = Action;
27+
28+
fn deref(&self) -> &Self::Target {
29+
&self.0
30+
}
31+
}
32+
2433
#[derive(Debug, Clone, BorshDeserialize, BorshSerialize, Serialize, Deserialize, PartialEq, Eq)]
2534
pub struct DelegateAction {
2635
pub sender_id: AccountId,

0 commit comments

Comments
 (0)