chore: update deps (#761)

This commit is contained in:
thesimplekid
2025-05-20 10:27:52 +01:00
committed by GitHub
parent b63dc1045d
commit abf10da330
16 changed files with 37 additions and 78 deletions

View File

@@ -9,11 +9,11 @@
//! whether to use real Lightning Network payments (regtest mode) or simulated payments.
use core::panic;
use std::env;
use std::fmt::Debug;
use std::str::FromStr;
use std::sync::Arc;
use std::time::Duration;
use std::{char, env};
use bip39::Mnemonic;
use cashu::{MeltRequest, PreMintSecrets};
@@ -134,17 +134,18 @@ async fn test_happy_mint_melt_round_trip() {
.await
.unwrap();
assert_eq!(
reader
.next()
.await
.unwrap()
.unwrap()
.to_text()
.unwrap()
.replace(char::is_whitespace, ""),
r#"{"jsonrpc":"2.0","result":{"status":"OK","subId":"test-sub"},"id":2}"#
);
// Parse both JSON strings to objects and compare them instead of comparing strings directly
let binding = reader.next().await.unwrap().unwrap();
let response_str = binding.to_text().unwrap();
let response_json: serde_json::Value =
serde_json::from_str(response_str).expect("Valid JSON response");
let expected_json: serde_json::Value = serde_json::from_str(
r#"{"jsonrpc":"2.0","result":{"status":"OK","subId":"test-sub"},"id":2}"#,
)
.expect("Valid JSON expected");
assert_eq!(response_json, expected_json);
let melt_response = wallet.melt(&melt.id).await.unwrap();
assert!(melt_response.preimage.is_some());