Skip to content

Commit 093d5ec

Browse files
authored
fix: overly-restrictive wasm cfg for keystore (#681)
1 parent b4d90ac commit 093d5ec

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

starknet-signers/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ coins-bip32 = { version = "0.11.1", optional = true }
2424
coins-ledger = { version = "0.12.0", default-features = false, optional = true }
2525
semver = { version = "1.0.23", optional = true }
2626

27-
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
27+
[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies]
2828
eth-keystore = { version = "0.5.0", default-features = false }
2929

3030
[target.'cfg(target_arch = "wasm32")'.dependencies]

starknet-signers/src/key_pair.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub struct VerifyingKey {
1919
}
2020

2121
/// Errors using an encrypted JSON keystore.
22-
#[cfg(not(target_arch = "wasm32"))]
22+
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
2323
#[derive(Debug, thiserror::Error)]
2424
pub enum KeystoreError {
2525
/// The file path is invalid.
@@ -59,7 +59,7 @@ impl SigningKey {
5959
}
6060

6161
/// Loads the private key from a Web3 Secret Storage Definition keystore.
62-
#[cfg(not(target_arch = "wasm32"))]
62+
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
6363
pub fn from_keystore<P>(path: P, password: &str) -> Result<Self, KeystoreError>
6464
where
6565
P: AsRef<std::path::Path>,
@@ -70,7 +70,7 @@ impl SigningKey {
7070
}
7171

7272
/// Encrypts and saves the private key to a Web3 Secret Storage Definition JSON file.
73-
#[cfg(not(target_arch = "wasm32"))]
73+
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
7474
pub fn save_as_keystore<P>(&self, path: P, password: &str) -> Result<(), KeystoreError>
7575
where
7676
P: AsRef<std::path::Path>,

starknet-signers/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
mod key_pair;
66
pub use key_pair::{SigningKey, VerifyingKey};
77

8-
#[cfg(not(target_arch = "wasm32"))]
8+
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
99
pub use key_pair::KeystoreError;
1010

1111
mod signer;

0 commit comments

Comments
 (0)