Skip to content

Commit 429b073

Browse files
committed
fix: more rust fmt
1 parent ba6b791 commit 429b073

File tree

1 file changed

+13
-7
lines changed
  • packages/sdk-platforms/rust/zksync-sso-erc4337/crates/zksync-sso-erc4337-ffi-web/src

1 file changed

+13
-7
lines changed

packages/sdk-platforms/rust/zksync-sso-erc4337/crates/zksync-sso-erc4337-ffi-web/src/lib.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,9 +1692,10 @@ pub fn encode_create_session_call_data(
16921692
use zksync_sso_erc4337_core::erc4337::account::modular_smart_account::session::SessionKeyValidator;
16931693

16941694
// Parse SessionSpec from JSON
1695-
let spec: SessionSpec = serde_json::from_str(&session_spec_json).map_err(|e| {
1696-
JsValue::from_str(&format!("Invalid SessionSpec JSON: {}", e))
1697-
})?;
1695+
let spec: SessionSpec =
1696+
serde_json::from_str(&session_spec_json).map_err(|e| {
1697+
JsValue::from_str(&format!("Invalid SessionSpec JSON: {}", e))
1698+
})?;
16981699

16991700
// Build createSession call and ABI encode
17001701
let create_session_calldata =
@@ -1721,12 +1722,17 @@ pub fn encode_session_state_call_data(
17211722
})?;
17221723

17231724
// Parse SessionSpec from JSON
1724-
let spec: SessionSpec = serde_json::from_str(&session_spec_json).map_err(|e| {
1725-
JsValue::from_str(&format!("Invalid SessionSpec JSON: {}", e))
1726-
})?;
1725+
let spec: SessionSpec =
1726+
serde_json::from_str(&session_spec_json).map_err(|e| {
1727+
JsValue::from_str(&format!("Invalid SessionSpec JSON: {}", e))
1728+
})?;
17271729

17281730
// Build sessionState call and ABI encode
1729-
let call_data = SessionKeyValidator::sessionStateCall { account: account_addr, spec: spec.into() }.abi_encode();
1731+
let call_data = SessionKeyValidator::sessionStateCall {
1732+
account: account_addr,
1733+
spec: spec.into(),
1734+
}
1735+
.abi_encode();
17301736

17311737
Ok(format!("0x{}", hex::encode(call_data)))
17321738
}

0 commit comments

Comments
 (0)