Skip to content

Commit 01eb57a

Browse files
committed
fmt
1 parent 8a7047c commit 01eb57a

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

tests/message-board-sync.rs

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,41 +25,41 @@ async fn test_message_board() {
2525
let _ = wasm_bindgen_futures::JsFuture::from(wasm_bindgen_rayon::init_thread_pool(10)).await;
2626
let main_handler = thread::Builder::new()
2727
.spawn_async(|| async {
28-
let mut w = WebWallet::new("main", "http://localhost:1234/mainnet", 1).unwrap();
28+
let mut w = WebWallet::new("main", "http://localhost:1234/mainnet", 1).unwrap();
2929

30-
let s = zcash_keys::encoding::decode_extended_full_viewing_key(
31-
constants::mainnet::HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY,
32-
SAPLING_EFVK.trim(),
33-
)
34-
.unwrap();
30+
let s = zcash_keys::encoding::decode_extended_full_viewing_key(
31+
constants::mainnet::HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY,
32+
SAPLING_EFVK.trim(),
33+
)
34+
.unwrap();
3535

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

41-
#[cfg(not(feature = "sync2"))]
42-
{
43-
tracing::info!("Syncing wallet with our sync impl");
44-
w.sync(&js_sys::Function::new_with_args(
45-
"scanned_to, tip",
46-
"console.log('Scanned: ', scanned_to, '/', tip)",
47-
))
48-
.await
49-
.unwrap();
50-
}
51-
#[cfg(feature = "sync2")]
52-
{
53-
tracing::info!("Syncing wallet with sync2");
54-
w.sync2().await.unwrap();
55-
}
56-
tracing::info!("Syncing complete :)");
41+
#[cfg(not(feature = "sync2"))]
42+
{
43+
tracing::info!("Syncing wallet with our sync impl");
44+
w.sync(&js_sys::Function::new_with_args(
45+
"scanned_to, tip",
46+
"console.log('Scanned: ', scanned_to, '/', tip)",
47+
))
48+
.await
49+
.unwrap();
50+
}
51+
#[cfg(feature = "sync2")]
52+
{
53+
tracing::info!("Syncing wallet with sync2");
54+
w.sync2().await.unwrap();
55+
}
56+
tracing::info!("Syncing complete :)");
57+
58+
let summary = w.get_wallet_summary().unwrap();
59+
tracing::info!("Wallet summary: {:?}", summary);
60+
})
61+
.unwrap()
62+
.join_async();
5763

58-
let summary = w.get_wallet_summary().unwrap();
59-
tracing::info!("Wallet summary: {:?}", summary);
60-
})
61-
.unwrap()
62-
.join_async();
63-
6464
main_handler.await.unwrap();
6565
}

0 commit comments

Comments
 (0)