Skip to content

Commit d4efadc

Browse files
committed
fix: feature defs
1 parent 35685fa commit d4efadc

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

Cargo.toml

+4-7
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,11 @@ chrono = "0.4.40"
3939
thiserror = "2.0.11"
4040
alloy = { version = "0.12.6", optional = true, default-features = false, features = ["std", "signer-aws", "signer-local", "consensus", "network"] }
4141
serde = { version = "1", features = ["derive"] }
42-
hex = { package = "const-hex", version = "1", default-features = false, features = [
43-
"alloc",
44-
] }
45-
async-trait = "0.1.80"
42+
async-trait = { version = "0.1.80", optional = true }
4643

4744
# AWS
48-
aws-config = "1.1.7"
49-
aws-sdk-kms = "1.15.0"
45+
aws-config = { version = "1.1.7", optional = true }
46+
aws-sdk-kms = { version = "1.15.0", optional = true }
5047

5148
[dev-dependencies]
5249
ajj = "0.3.1"
@@ -57,5 +54,5 @@ tokio = { version = "1.43.0", features = ["macros"] }
5754

5855
[features]
5956
default = ["alloy"]
60-
alloy = ["dep:alloy"]
57+
alloy = ["dep:alloy", "dep:async-trait", "dep:aws-config", "dep:aws-sdk-kms"]
6158
perms = []

src/utils/signer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub enum SignerError {
7575
Wallet(#[from] LocalSignerError),
7676
/// Error parsing hex
7777
#[error("failed to parse hex: {0}")]
78-
Hex(#[from] hex::FromHexError),
78+
Hex(#[from] alloy::hex::FromHexError),
7979
}
8080

8181
impl LocalOrAws {
@@ -95,7 +95,7 @@ impl LocalOrAws {
9595
///
9696
/// Panics if the env var contents is not a valid secp256k1 private key.
9797
fn wallet(private_key: &str) -> Result<PrivateKeySigner, SignerError> {
98-
let bytes = hex::decode(private_key.strip_prefix("0x").unwrap_or(private_key))?;
98+
let bytes = alloy::hex::decode(private_key.strip_prefix("0x").unwrap_or(private_key))?;
9999
Ok(PrivateKeySigner::from_slice(&bytes).unwrap())
100100
}
101101

0 commit comments

Comments
 (0)