diff --git a/Cargo.toml b/Cargo.toml index b62693b3..dcda6d86 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 = "682bb3fafc234b8244f1f072aca2aa7c291061f8" } +bcr-common = { git = "https://github.com/BitcreditProtocol/bcr-common", rev = "dc0e7d73b5bfbe7df88baf8cb2887fd6512c08f0" } 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 15762e69..e6e27254 100644 --- a/crates/bcr-ebill-api/src/external/mint.rs +++ b/crates/bcr-ebill-api/src/external/mint.rs @@ -4,9 +4,7 @@ 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, DeriveEbillPaymentAddressRequest, -}; +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::{ @@ -383,17 +381,14 @@ impl MintClientApi for MintClient { let beta_url = url::Url::from_str(&random_beta.mint.to_string()).map_err(|_| Error::InvalidMintUrl)?; - let req = DeriveEbillPaymentAddressRequest { - alpha_node_id: *mint_info.node_id, - bill_id: bill_id.to_owned(), - block_id: block_id.inner(), - previous_block_hash: sha256::Hash::from_byte_array( - previous_block_hash.decode_to_array(), - ), - }; let derived_payment_address_from_beta = self .client(&beta_url)? - .post_derive_ebill_payment_address(req) + .derive_ebill_payment_address( + *mint_info.node_id, + bill_id.to_owned(), + block_id.inner(), + sha256::Hash::from_byte_array(previous_block_hash.decode_to_array()), + ) .await .map_err(|e| { log::error!("Error deriving payment address on mint {beta_url}: {e}");