mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 23:55:01 +01:00
chore: update deps (#761)
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user