Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 6e73695

Browse files
committed
Don't truncate cashu mint urls
1 parent 8929f85 commit 6e73695

4 files changed

Lines changed: 11 additions & 13 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mutiny-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ payjoin = { version = "0.13.0", features = ["send", "base64"] }
4848
bincode = "1.3.3"
4949
hex-conservative = "0.1.1"
5050
async-lock = "3.2.0"
51-
bitcoin-waila = { git = "https://github.com/mutinywallet/bitcoin-waila", rev = "a99b4c8d949661e775593354f8afbefa80aeb44a" }
51+
bitcoin-waila = "0.5.0"
5252

5353
fedimint-client = "0.3.0"
5454
fedimint-core = "0.3.0"

mutiny-core/src/cashu.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,27 @@ impl CashuHttpClient {
2626
url: &Url,
2727
melt_quote_request: PostMeltQuoteBolt11Request,
2828
) -> Result<PostMeltQuoteBolt11Response, MutinyError> {
29-
self.mint_post(
30-
&url.join("/v1/melt/quote/bolt11")?,
31-
json!(melt_quote_request),
32-
)
33-
.await
29+
let url = format!("{url}/v1/melt/quote/bolt11");
30+
self.mint_post(url, json!(melt_quote_request)).await
3431
}
3532

3633
pub async fn post_melt_bolt11(
3734
&self,
3835
url: &Url,
3936
melt_request: PostMeltBolt11Request,
4037
) -> Result<PostMeltBolt11Response, MutinyError> {
41-
self.mint_post(&url.join("/v1/melt/bolt11")?, json!(melt_request))
42-
.await
38+
let url = format!("{url}/v1/melt/bolt11");
39+
self.mint_post(url, json!(melt_request)).await
4340
}
4441

4542
async fn mint_post<T: serde::de::DeserializeOwned>(
4643
&self,
47-
url: &Url,
44+
url: String,
4845
body: Value,
4946
) -> Result<T, MutinyError> {
5047
let res = self
5148
.client
52-
.post(url.clone())
49+
.post(url)
5350
.header("Content-Type", "application/json")
5451
.body(body.to_string())
5552
.send()

mutiny-wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ payjoin = { version = "0.13.0", features = ["send", "base64"] }
4747
fedimint-core = "0.3.0"
4848
moksha-core = "0.2.1"
4949

50-
bitcoin-waila = { git = "https://github.com/mutinywallet/bitcoin-waila", rev = "a99b4c8d949661e775593354f8afbefa80aeb44a" }
50+
bitcoin-waila = "0.5.0"
5151

5252
# The `console_error_panic_hook` crate provides better debugging of panics by
5353
# logging them with `console.error`. This is great for development, but requires

0 commit comments

Comments
 (0)