Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ec2 committed Sep 19, 2024
1 parent 8a7047c commit 01eb57a
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions tests/message-board-sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,41 +25,41 @@ async fn test_message_board() {
let _ = wasm_bindgen_futures::JsFuture::from(wasm_bindgen_rayon::init_thread_pool(10)).await;
let main_handler = thread::Builder::new()
.spawn_async(|| async {
let mut w = WebWallet::new("main", "http://localhost:1234/mainnet", 1).unwrap();
let mut w = WebWallet::new("main", "http://localhost:1234/mainnet", 1).unwrap();

let s = zcash_keys::encoding::decode_extended_full_viewing_key(
constants::mainnet::HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY,
SAPLING_EFVK.trim(),
)
.unwrap();
let s = zcash_keys::encoding::decode_extended_full_viewing_key(
constants::mainnet::HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY,
SAPLING_EFVK.trim(),
)
.unwrap();

let ufvk = UnifiedFullViewingKey::from_sapling_extended_full_viewing_key(s).unwrap();
let ufvk_str = ufvk.encode(&Network::MainNetwork);
let id = w.import_ufvk(&ufvk_str, Some(2477329)).await.unwrap();
tracing::info!("Created account with id: {}", id);
let ufvk = UnifiedFullViewingKey::from_sapling_extended_full_viewing_key(s).unwrap();
let ufvk_str = ufvk.encode(&Network::MainNetwork);
let id = w.import_ufvk(&ufvk_str, Some(2477329)).await.unwrap();
tracing::info!("Created account with id: {}", id);

#[cfg(not(feature = "sync2"))]
{
tracing::info!("Syncing wallet with our sync impl");
w.sync(&js_sys::Function::new_with_args(
"scanned_to, tip",
"console.log('Scanned: ', scanned_to, '/', tip)",
))
.await
.unwrap();
}
#[cfg(feature = "sync2")]
{
tracing::info!("Syncing wallet with sync2");
w.sync2().await.unwrap();
}
tracing::info!("Syncing complete :)");
#[cfg(not(feature = "sync2"))]
{
tracing::info!("Syncing wallet with our sync impl");
w.sync(&js_sys::Function::new_with_args(
"scanned_to, tip",
"console.log('Scanned: ', scanned_to, '/', tip)",
))
.await
.unwrap();
}
#[cfg(feature = "sync2")]
{
tracing::info!("Syncing wallet with sync2");
w.sync2().await.unwrap();
}
tracing::info!("Syncing complete :)");

let summary = w.get_wallet_summary().unwrap();
tracing::info!("Wallet summary: {:?}", summary);
})
.unwrap()
.join_async();

let summary = w.get_wallet_summary().unwrap();
tracing::info!("Wallet summary: {:?}", summary);
})
.unwrap()
.join_async();

main_handler.await.unwrap();
}

0 comments on commit 01eb57a

Please sign in to comment.