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

Commit 142d0b5

Browse files
authored
Merge pull request #1139 from MutinyWallet/cashu-fix
Fixes for cashu
2 parents 3606842 + 6e73695 commit 142d0b5

4 files changed

Lines changed: 16 additions & 17 deletions

File tree

Cargo.lock

Lines changed: 6 additions & 4 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: 2 additions & 2 deletions
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 = "1d6c416fc0abaa2efa78e3dcf28450975d8f7bfe" }
51+
bitcoin-waila = "0.5.0"
5252

5353
fedimint-client = "0.3.0"
5454
fedimint-core = "0.3.0"
@@ -58,7 +58,7 @@ fedimint-ln-client = "0.3.0"
5858
fedimint-bip39 = "0.3.0"
5959
fedimint-ln-common = "0.3.0"
6060
fedimint-tbs = "0.3.0"
61-
moksha-core = { git = "https://github.com/ngutech21/moksha", rev = "18d99977965662d46ccec29fecdb0ce493745917" }
61+
moksha-core = "0.2.1"
6262

6363
base64 = "0.13.0"
6464
pbkdf2 = "0.11"

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ once_cell = "1.18.0"
4545
hex-conservative = "0.1.1"
4646
payjoin = { version = "0.13.0", features = ["send", "base64"] }
4747
fedimint-core = "0.3.0"
48-
moksha-core = { git = "https://github.com/ngutech21/moksha", rev = "18d99977965662d46ccec29fecdb0ce493745917" }
48+
moksha-core = "0.2.1"
4949

50-
bitcoin-waila = { git = "https://github.com/mutinywallet/bitcoin-waila", rev = "1d6c416fc0abaa2efa78e3dcf28450975d8f7bfe" }
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)