From 01eb57a4c8088b32c917b6f1a5a14a20a9c3660a Mon Sep 17 00:00:00 2001 From: Eric Tu Date: Thu, 19 Sep 2024 17:29:33 -0400 Subject: [PATCH] fmt --- tests/message-board-sync.rs | 64 ++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/tests/message-board-sync.rs b/tests/message-board-sync.rs index 572e6dd..4160a44 100644 --- a/tests/message-board-sync.rs +++ b/tests/message-board-sync.rs @@ -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(); }