Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 10eb4ed

Browse files
committed
Use crates release
1 parent c8a08b7 commit 10eb4ed

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

mutiny-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ js-sys = { version = "0.3.60" }
7373
gloo-net = { version = "0.2.4" }
7474
instant = { version = "0.1", features = ["wasm-bindgen"] }
7575
getrandom = { version = "0.2", features = ["js"] }
76-
windowless_sleep = { git = "https://github.com/futurepaul/windowless_sleep", rev = "e924649" }
76+
windowless_sleep = "0.1.1"
7777

7878
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
7979
web-sys = { version = "0.3.60", features = ["console"] }

mutiny-core/src/storage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::sync::{Arc, RwLock};
1515
use uuid::Uuid;
1616

1717
pub const KEYCHAIN_STORE_KEY: &str = "bdk_keychain";
18-
pub(crate) const MNEMONIC_KEY: &str = "mnemonic";
18+
pub const MNEMONIC_KEY: &str = "mnemonic";
1919
pub(crate) const NEED_FULL_SYNC_KEY: &str = "needs_full_sync";
2020
pub const NODES_KEY: &str = "nodes";
2121
const FEE_ESTIMATES_KEY: &str = "fee_estimates";

mutiny-wasm/src/indexed_db.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,7 @@ mod tests {
640640
use crate::utils::sleep;
641641
use crate::utils::test::log;
642642
use bip39::Mnemonic;
643-
use bitcoin::hashes::hex::ToHex;
644643
use mutiny_core::storage::MutinyStorage;
645-
use mutiny_core::test_utils::MANAGER_BYTES;
646644
use mutiny_core::{encrypt::encryption_key_from_pass, logging::MutinyLogger};
647645
use serde_json::json;
648646
use std::str::FromStr;
@@ -818,17 +816,11 @@ mod tests {
818816
log!("{test_name}");
819817
let logger = Arc::new(MutinyLogger::default());
820818

821-
let key = format!("{CHANNEL_MANAGER_KEY}_test_{test_name}");
822-
let data = VersionedValue {
823-
version: 69,
824-
// just use this as dummy data
825-
value: Value::String(MANAGER_BYTES.to_hex()),
826-
};
827819
let storage = IndexedDbStorage::new(None, None, None, logger.clone())
828820
.await
829821
.unwrap();
830-
831-
storage.set_data(&key, data, None).unwrap();
822+
let seed = generate_seed(12).unwrap();
823+
storage.set_data(MNEMONIC_KEY, seed, None).unwrap();
832824
// wait for the storage to be persisted
833825
utils::sleep(1_000).await;
834826

@@ -840,9 +832,11 @@ mod tests {
840832
.transpose()
841833
.unwrap();
842834

843-
let result = IndexedDbStorage::new(password, cipher, None, logger).await;
835+
let storage = IndexedDbStorage::new(password, cipher, None, logger)
836+
.await
837+
.unwrap();
844838

845-
match result {
839+
match storage.get_mnemonic() {
846840
Err(MutinyError::IncorrectPassword) => (),
847841
Ok(_) => panic!("Expected IncorrectPassword error, got Ok"),
848842
Err(e) => panic!("Expected IncorrectPassword error, got {:?}", e),

0 commit comments

Comments
 (0)