Skip to content

Commit

Permalink
Use crates release
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Nov 7, 2023
1 parent ed303fc commit e3ee5e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion mutiny-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ js-sys = { version = "0.3.60" }
gloo-net = { version = "0.2.4" }
instant = { version = "0.1", features = ["wasm-bindgen"] }
getrandom = { version = "0.2", features = ["js"] }
windowless_sleep = { git = "https://github.com/futurepaul/windowless_sleep", rev = "e924649" }
windowless_sleep = "0.1.1"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
web-sys = { version = "0.3.60", features = ["console"] }
Expand Down
18 changes: 6 additions & 12 deletions mutiny-wasm/src/indexed_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,7 @@ mod tests {
use crate::utils::sleep;
use crate::utils::test::log;
use bip39::Mnemonic;
use bitcoin::hashes::hex::ToHex;
use mutiny_core::storage::MutinyStorage;
use mutiny_core::test_utils::MANAGER_BYTES;
use mutiny_core::{encrypt::encryption_key_from_pass, logging::MutinyLogger};
use serde_json::json;
use std::str::FromStr;
Expand Down Expand Up @@ -892,17 +890,11 @@ mod tests {
log!("{test_name}");
let logger = Arc::new(MutinyLogger::default());

let key = format!("{CHANNEL_MANAGER_KEY}_test_{test_name}");
let data = VersionedValue {
version: 69,
// just use this as dummy data
value: Value::String(MANAGER_BYTES.to_hex()),
};
let storage = IndexedDbStorage::new(None, None, None, logger.clone())
.await
.unwrap();

storage.set_data(&key, data, None).unwrap();
let seed = generate_seed(12).unwrap();
storage.set_data(MNEMONIC_KEY, seed, None).unwrap();
// wait for the storage to be persisted
utils::sleep(1_000).await;

Expand All @@ -914,9 +906,11 @@ mod tests {
.transpose()
.unwrap();

let result = IndexedDbStorage::new(password, cipher, None, logger).await;
let storage = IndexedDbStorage::new(password, cipher, None, logger)
.await
.unwrap();

match result {
match storage.get_mnemonic() {
Err(MutinyError::IncorrectPassword) => (),
Ok(_) => panic!("Expected IncorrectPassword error, got Ok"),
Err(e) => panic!("Expected IncorrectPassword error, got {:?}", e),
Expand Down

0 comments on commit e3ee5e8

Please sign in to comment.