diff --git a/Cargo.toml b/Cargo.toml index c107f050..ddfe25d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,7 +68,7 @@ bcr-ebill-core = { path = "./crates/bcr-ebill-core" } bcr-ebill-api = { path = "./crates/bcr-ebill-api" } bcr-ebill-persistence = { path = "./crates/bcr-ebill-persistence" } bcr-ebill-transport = { path = "./crates/bcr-ebill-transport" } -bcr-common = { git = "https://github.com/BitcreditProtocol/bcr-common", rev = "c57a0c12859ee87f1a1efddbe991ced6e7665d18" } +bcr-common = { git = "https://github.com/BitcreditProtocol/bcr-common", rev = "3359dd7ebc6faa24c1bd9b8e6c09697b6c864262" } surrealdb = { version = "2.3", default-features = false } strum = { version = "0.27", features = ["derive"] } url = { version = "2.5" } diff --git a/crates/bcr-ebill-api/src/external/mint.rs b/crates/bcr-ebill-api/src/external/mint.rs index e6e27254..c1234a33 100644 --- a/crates/bcr-ebill-api/src/external/mint.rs +++ b/crates/bcr-ebill-api/src/external/mint.rs @@ -4,7 +4,6 @@ use async_trait::async_trait; use bcr_common::cashu::{self, ProofsMethods, State, nut01 as cdk01, nut02 as cdk02}; use bcr_common::client::mint::Client as ExternalMintClient; use bcr_common::core::BillId; -use bcr_common::wire::clowder::{ConnectedMintResponse, ConnectedMintsResponse}; use bcr_common::wire::quotes::{ResolveOffer, StatusReply}; use bcr_ebill_core::protocol::{BitcoinAddress, BlockId, Sha256Hash, Sum}; use bcr_ebill_core::{ @@ -13,7 +12,6 @@ use bcr_ebill_core::{ }; use nostr::hashes::{Hash, sha256}; use secp256k1::rand::{prelude::SliceRandom, thread_rng}; -use serde::Deserialize; use thiserror::Error; use uuid::Uuid; @@ -379,10 +377,9 @@ impl MintClientApi for MintClient { return Err(Error::NoBetas.into()); }; - let beta_url = - url::Url::from_str(&random_beta.mint.to_string()).map_err(|_| Error::InvalidMintUrl)?; + let beta_url = &random_beta.mint; let derived_payment_address_from_beta = self - .client(&beta_url)? + .client(beta_url)? .derive_ebill_payment_address( *mint_info.node_id, bill_id.to_owned(), @@ -522,34 +519,6 @@ impl From for QuoteStatusReply { } } -#[derive(Debug, Clone, Deserialize)] -pub struct ConnectedMintReply { - pub mint: cashu::MintUrl, - pub pub_key: secp256k1::PublicKey, -} - -impl From for ConnectedMintReply { - fn from(value: ConnectedMintResponse) -> Self { - Self { - mint: value.mint, - pub_key: value.node_id, - } - } -} - -#[derive(Debug, Clone, Deserialize)] -pub struct ConnectedMintsReply { - pub mints: Vec, -} - -impl From for ConnectedMintsReply { - fn from(value: ConnectedMintsResponse) -> Self { - Self { - mints: value.mints.into_iter().map(|m| m.into()).collect(), - } - } -} - fn map_shared_bill( bill_to_share: BillToShareWithExternalParty, ) -> bcr_common::wire::quotes::SharedBill {