Skip to content

Commit

Permalink
fix: wallet bolt12 mint
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Oct 30, 2024
1 parent cbe72d9 commit e24f081
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/cdk/src/wallet/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl HttpClient {
amount: Amount,
unit: CurrencyUnit,
description: Option<String>,
) -> Result<MintQuoteBolt11Response, Error> {
) -> Result<MintQuoteBolt12Response, Error> {
let url = mint_url.join_paths(&["v1", "mint", "quote", "bolt12"])?;

let request = MintQuoteBolt11Request {
Expand All @@ -162,7 +162,7 @@ impl HttpClient {

let res = res.json::<Value>().await?;

match serde_json::from_value::<MintQuoteBolt11Response>(res.clone()) {
match serde_json::from_value::<MintQuoteBolt12Response>(res.clone()) {
Ok(mint_quote_response) => Ok(mint_quote_response),
Err(err) => {
tracing::warn!("{}", err);
Expand Down
2 changes: 1 addition & 1 deletion crates/cdk/src/wallet/mint_bolt12.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Wallet {
amount,
unit,
request: quote_res.request,
state: quote_res.state,
state: crate::nuts::MintQuoteState::Unpaid,
expiry: quote_res.expiry.unwrap_or(0),
amount_minted: Amount::ZERO,
amount_paid: Amount::ZERO,
Expand Down

0 comments on commit e24f081

Please sign in to comment.