Skip to content

Commit

Permalink
fix: rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Oct 25, 2024
1 parent fe4ea56 commit a666ab2
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 15 deletions.
4 changes: 1 addition & 3 deletions crates/cdk-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,9 @@ async fn main() -> Result<()> {
sub_commands::update_mint_url::update_mint_url(&multi_mint_wallet, sub_command_args)
.await
}
<<<<<<< HEAD
Commands::ListMintProofs => {
sub_commands::list_mint_proofs::proofs(&multi_mint_wallet).await
=======
}
Commands::ReMint(sub_command_args) => {
sub_commands::remint_bolt12::remint(
&multi_mint_wallet,
Expand All @@ -215,7 +214,6 @@ async fn main() -> Result<()> {
sub_command_args,
)
.await
>>>>>>> 962e6143 (feat: mint multiple)
}
}
}
4 changes: 2 additions & 2 deletions crates/cdk-cln/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use cdk::nuts::{
use cdk::util::{hex, unix_time};
use cdk::{mint, Bolt11Invoice};
use cln_rpc::model::requests::{
FetchinvoiceRequest, InvoiceRequest, ListinvoicesRequest, ListpaysRequest, PayRequest,
WaitanyinvoiceRequest,
FetchinvoiceRequest, InvoiceRequest, ListinvoicesRequest, ListpaysRequest, OfferRequest,
PayRequest, WaitanyinvoiceRequest,
};
use cln_rpc::model::responses::{
ListinvoicesInvoices, ListinvoicesInvoicesStatus, ListpaysPaysStatus, PayStatus,
Expand Down
3 changes: 2 additions & 1 deletion crates/cdk-integration-tests/tests/mint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ async fn mint_proofs(
mint.mint_url.clone(),
"".to_string(),
CurrencyUnit::Sat,
amount,
Some(amount),
unix_time() + 36000,
request_lookup.to_string(),
Amount::ZERO,
Amount::ZERO,
None,
);

mint.localstore.add_mint_quote(quote.clone()).await?;
Expand Down
1 change: 0 additions & 1 deletion crates/cdk-mintd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use clap::Parser;
use tokio::sync::Notify;
use tower_http::cors::CorsLayer;
use tracing_subscriber::EnvFilter;
use url::Url;
#[cfg(feature = "swagger")]
use utoipa::OpenApi;

Expand Down
12 changes: 6 additions & 6 deletions crates/cdk/src/wallet/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ impl HttpClient {
#[instrument(skip(self), fields(mint_url = %mint_url))]
pub async fn post_mint_bolt12_quote(
&self,
mint_url: Url,
mint_url: MintUrl,
amount: Amount,
unit: CurrencyUnit,
description: Option<String>,
) -> Result<MintQuoteBolt11Response, Error> {
let url = join_url(mint_url, &["v1", "mint", "quote", "bolt12"])?;
let url = mint_url.join_paths(&["v1", "mint", "quote", "bolt12"])?;

let request = MintQuoteBolt11Request {
amount,
Expand Down Expand Up @@ -258,12 +258,12 @@ impl HttpClient {
#[instrument(skip(self, request), fields(mint_url = %mint_url))]
pub async fn post_melt_bolt12_quote(
&self,
mint_url: Url,
mint_url: MintUrl,
unit: CurrencyUnit,
request: String,
amount: Option<Amount>,
) -> Result<MeltQuoteBolt11Response, Error> {
let url = join_url(mint_url, &["v1", "melt", "quote", "bolt12"])?;
let url = mint_url.join_paths(&["v1", "melt", "quote", "bolt12"])?;

let request = MeltQuoteBolt12Request {
request,
Expand Down Expand Up @@ -341,12 +341,12 @@ impl HttpClient {
#[instrument(skip(self, quote, inputs, outputs), fields(mint_url = %mint_url))]
pub async fn post_melt_bolt12(
&self,
mint_url: Url,
mint_url: MintUrl,
quote: String,
inputs: Vec<Proof>,
outputs: Option<Vec<BlindedMessage>>,
) -> Result<MeltQuoteBolt11Response, Error> {
let url = join_url(mint_url, &["v1", "melt", "bolt12"])?;
let url = mint_url.join_paths(&["v1", "melt", "bolt12"])?;

let request = MeltBolt12Request {
quote,
Expand Down
2 changes: 1 addition & 1 deletion crates/cdk/src/wallet/melt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl Wallet {
let quote_res = self
.client
.post_melt_bolt12_quote(
self.mint_url.clone().try_into()?,
self.mint_url.clone(),
self.unit,
request.to_string(),
Some(amount),
Expand Down
2 changes: 1 addition & 1 deletion crates/cdk/src/wallet/mint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl Wallet {

let quote_res = self
.client
.post_mint_bolt12_quote(mint_url.clone().try_into()?, amount, unit, description)
.post_mint_bolt12_quote(mint_url.clone(), amount, unit, description)
.await?;

let quote = MintQuote {
Expand Down

0 comments on commit a666ab2

Please sign in to comment.