Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
19 changes: 7 additions & 12 deletions crates/bcr-ebill-api/src/external/mint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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}");
Expand Down
Loading