diff --git a/starknet-signers/Cargo.toml b/starknet-signers/Cargo.toml index 1c040d9c..4192307a 100644 --- a/starknet-signers/Cargo.toml +++ b/starknet-signers/Cargo.toml @@ -24,7 +24,7 @@ coins-bip32 = { version = "0.11.1", optional = true } coins-ledger = { version = "0.12.0", default-features = false, optional = true } semver = { version = "1.0.23", optional = true } -[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies] eth-keystore = { version = "0.5.0", default-features = false } [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/starknet-signers/src/key_pair.rs b/starknet-signers/src/key_pair.rs index 2b24798e..e89f52da 100644 --- a/starknet-signers/src/key_pair.rs +++ b/starknet-signers/src/key_pair.rs @@ -19,7 +19,7 @@ pub struct VerifyingKey { } /// Errors using an encrypted JSON keystore. -#[cfg(not(target_arch = "wasm32"))] +#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))] #[derive(Debug, thiserror::Error)] pub enum KeystoreError { /// The file path is invalid. @@ -59,7 +59,7 @@ impl SigningKey { } /// Loads the private key from a Web3 Secret Storage Definition keystore. - #[cfg(not(target_arch = "wasm32"))] + #[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))] pub fn from_keystore
(path: P, password: &str) -> Result (&self, path: P, password: &str) -> Result<(), KeystoreError>
where
P: AsRef