File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ struct MultiSigPayload {
7777
7878#[ derive( Clone , Serialize ) ]
7979#[ serde( rename_all = "camelCase" ) ]
80- pub ( crate ) struct MultiSigAction {
80+ pub struct MultiSigAction {
8181 #[ serde( rename = "type" , skip_serializing_if = "Option::is_none" ) ]
8282 pub r#type : Option < String > ,
8383 pub signature_chain_id : String ,
@@ -156,7 +156,7 @@ impl From<MultiSigAction> for PostAction {
156156}
157157
158158impl Actions {
159- fn hash (
159+ pub fn hash (
160160 & self ,
161161 timestamp : u64 ,
162162 vault_address : Option < Address > ,
Original file line number Diff line number Diff line change @@ -16,6 +16,16 @@ pub(crate) mod l1 {
1616 }
1717 }
1818
19+ impl Agent {
20+ pub fn new ( is_mainnet : bool , connection_id : B256 ) -> Agent {
21+ let source = if is_mainnet { "a" } else { "b" } . to_string ( ) ;
22+ Agent {
23+ source,
24+ connectionId : connection_id,
25+ }
26+ }
27+ }
28+
1929 impl Eip712 for Agent {
2030 fn domain ( & self ) -> Eip712Domain {
2131 eip712_domain ! {
Original file line number Diff line number Diff line change @@ -10,11 +10,7 @@ pub(crate) fn sign_l1_action(
1010 connection_id : B256 ,
1111 is_mainnet : bool ,
1212) -> Result < Signature > {
13- let source = if is_mainnet { "a" } else { "b" } . to_string ( ) ;
14- let payload = l1:: Agent {
15- source,
16- connectionId : connection_id,
17- } ;
13+ let payload = l1:: Agent :: new ( is_mainnet, connection_id) ;
1814 sign_typed_data ( & payload, wallet)
1915}
2016
You can’t perform that action at this time.
0 commit comments