From 60b058f01e8f0ceb74938991cc3796c17c87ad37 Mon Sep 17 00:00:00 2001 From: ngutech21 Date: Fri, 29 Mar 2024 15:58:19 +0100 Subject: [PATCH] fix: tests --- moksha-wallet/src/wallet.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/moksha-wallet/src/wallet.rs b/moksha-wallet/src/wallet.rs index a2ba85a4..8f9cf4ec 100644 --- a/moksha-wallet/src/wallet.rs +++ b/moksha-wallet/src/wallet.rs @@ -459,6 +459,7 @@ where }, ) .await?; + tx.commit().await?; Ok(secret_range) } @@ -772,7 +773,8 @@ mod tests { id: keys.keyset_id.clone(), unit: CurrencyUnit::Sat, }; - let keys_response = KeysResponse::new(key_response); + let keys_response = KeysResponse::new(key_response.clone()); + let keys_by_id_response = keys_response.clone(); let keysets = V1Keysets::new(keys.keyset_id, CurrencyUnit::Sat, true); let mut client = MockCashuClient::default(); @@ -782,6 +784,9 @@ mod tests { client .expect_get_keysets() .returning(move |_| Ok(keysets.clone())); + client + .expect_get_keys_by_id() + .returning(move |_, _| Ok(keys_by_id_response.clone())); client.expect_is_v1_supported().returning(move |_| Ok(true)); client }