Skip to content

Commit 965e2a1

Browse files
committed
refactoring to: check_lnd_snapshot: Option<bool>
1 parent aa554a6 commit 965e2a1

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

mutiny-wasm/src/lib.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl MutinyWallet {
106106
blind_auth_url: Option<String>,
107107
hermes_url: Option<String>,
108108
ln_event_topic: Option<String>,
109-
check_lnd_snapshot: bool,
109+
check_lnd_snapshot: Option<bool>,
110110
) -> Result<MutinyWallet, MutinyJsError> {
111111
let start = instant::Instant::now();
112112

@@ -216,7 +216,7 @@ impl MutinyWallet {
216216
blind_auth_url: Option<String>,
217217
hermes_url: Option<String>,
218218
ln_event_callback: Option<CommonLnEventCallback>,
219-
check_lnd_snapshot: bool,
219+
check_lnd_snapshot: Option<bool>,
220220
) -> Result<MutinyWallet, MutinyJsError> {
221221
let safe_mode = safe_mode.unwrap_or(false);
222222
let logger = Arc::new(MutinyLogger::memory_only());
@@ -393,7 +393,7 @@ impl MutinyWallet {
393393
if safe_mode {
394394
config_builder.with_safe_mode();
395395
}
396-
if check_lnd_snapshot {
396+
if let Some(true) = check_lnd_snapshot {
397397
config_builder.do_check_lnd_snapshot();
398398
}
399399
let config = config_builder.build();
@@ -1414,7 +1414,7 @@ mod tests {
14141414
None,
14151415
None,
14161416
None,
1417-
false,
1417+
None,
14181418
)
14191419
.await
14201420
.expect("mutiny wallet should initialize");
@@ -1459,7 +1459,7 @@ mod tests {
14591459
None,
14601460
None,
14611461
None,
1462-
false,
1462+
None,
14631463
)
14641464
.await
14651465
.expect("mutiny wallet should initialize");
@@ -1498,7 +1498,7 @@ mod tests {
14981498
None,
14991499
None,
15001500
None,
1501-
false,
1501+
None,
15021502
)
15031503
.await;
15041504

@@ -1550,7 +1550,7 @@ mod tests {
15501550
None,
15511551
None,
15521552
None,
1553-
false,
1553+
None,
15541554
)
15551555
.await
15561556
.expect("mutiny wallet should initialize");
@@ -1588,7 +1588,7 @@ mod tests {
15881588
None,
15891589
None,
15901590
None,
1591-
false,
1591+
None,
15921592
)
15931593
.await;
15941594

@@ -1643,7 +1643,7 @@ mod tests {
16431643
None,
16441644
None,
16451645
None,
1646-
false,
1646+
None,
16471647
)
16481648
.await
16491649
.unwrap();
@@ -1700,7 +1700,7 @@ mod tests {
17001700
None,
17011701
None,
17021702
None,
1703-
false,
1703+
None,
17041704
)
17051705
.await
17061706
.unwrap();
@@ -1744,7 +1744,7 @@ mod tests {
17441744
None,
17451745
None,
17461746
None,
1747-
false,
1747+
None,
17481748
)
17491749
.await;
17501750

@@ -1788,7 +1788,7 @@ mod tests {
17881788
None,
17891789
None,
17901790
None,
1791-
false,
1791+
None,
17921792
)
17931793
.await
17941794
.expect("mutiny wallet should initialize");
@@ -1862,7 +1862,7 @@ mod tests {
18621862
None,
18631863
None,
18641864
None,
1865-
false,
1865+
None,
18661866
)
18671867
.await
18681868
.expect("mutiny wallet should initialize");
@@ -1927,7 +1927,7 @@ mod tests {
19271927
None,
19281928
None,
19291929
None,
1930-
false,
1930+
None,
19311931
)
19321932
.await
19331933
.expect("mutiny wallet should initialize");

0 commit comments

Comments
 (0)