Skip to content

Commit 30cf2ce

Browse files
committed
resolve chainId from string
1 parent 2e50f0b commit 30cf2ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/signer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use alloy::{
22
dyn_abi::TypedData,
33
primitives::{Address, ChainId},
44
};
5-
use schemars::JsonSchema;
65
use serde::{Deserialize, Serialize};
76
use serde_with::{DisplayFromStr, PickFirst, serde_as};
87
use vault_sdk::VaultClient;
@@ -16,15 +15,16 @@ use crate::{
1615
};
1716

1817
/// EOA signing options
19-
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, utoipa::ToSchema)]
18+
#[serde_as]
19+
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
2020
#[serde(rename_all = "camelCase")]
2121
pub struct EoaSigningOptions {
2222
/// The EOA address to sign with
23-
#[schemars(with = "AddressDef")]
2423
#[schema(value_type = AddressDef)]
2524
pub from: Address,
2625
/// Optional chain ID for the signature
2726
#[serde(skip_serializing_if = "Option::is_none")]
27+
#[serde_as(as = "Option<PickFirst<(_, DisplayFromStr)>>")]
2828
pub chain_id: Option<ChainId>,
2929
}
3030

0 commit comments

Comments
 (0)