From d629f0c18cb9395b8cd0c87d7d3ad89cad349df5 Mon Sep 17 00:00:00 2001 From: DanGould Date: Fri, 22 Dec 2023 12:50:17 -0500 Subject: [PATCH] Depend on payjoin taproot spend fix --- Cargo.lock | 5 +++-- mutiny-core/Cargo.toml | 2 +- mutiny-core/src/error.rs | 12 ++++++------ mutiny-wasm/Cargo.toml | 2 +- mutiny-wasm/src/error.rs | 8 ++++---- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0392090a9..a6e815489 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3188,9 +3188,9 @@ checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "payjoin" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "430b856cb226047d3e33e055efc8c271ff246662cbb804b2a81f411b446e5b9d" +checksum = "e7b659f9e4ff06192df5d4504ea7ae866a1680eb2c87e4dca521fb14753eb0e7" dependencies = [ "bhttp", "bip21", @@ -3200,6 +3200,7 @@ dependencies = [ "ohttp", "rand", "serde", + "serde_json", "url", ] diff --git a/mutiny-core/Cargo.toml b/mutiny-core/Cargo.toml index 66fb4c398..c3c9c4d67 100644 --- a/mutiny-core/Cargo.toml +++ b/mutiny-core/Cargo.toml @@ -44,7 +44,7 @@ cbc = { version = "0.1", features = ["alloc"] } aes = { version = "0.8" } jwt-compact = { version = "0.8.0-beta.1", features = ["es256k"] } argon2 = { version = "0.5.0", features = ["password-hash", "alloc"] } -payjoin = { version = "0.12.0", features = ["v2", "send", "receive", "base64"] } +payjoin = { version = "0.13.0", features = ["v2", "send", "receive", "base64"] } gluesql = { version = "0.15", default-features = false, features = ["memory-storage"] } gluesql-core = "0.15.0" bincode = "1.3.3" diff --git a/mutiny-core/src/error.rs b/mutiny-core/src/error.rs index 7ab49d9c8..47763cd63 100644 --- a/mutiny-core/src/error.rs +++ b/mutiny-core/src/error.rs @@ -147,9 +147,9 @@ pub enum MutinyError { /// Payjoin request creation failed. #[error("Failed to create payjoin request.")] PayjoinCreateRequest, - /// Payjoin response validation failed. - #[error("Failed to validate payjoin response.")] - PayjoinValidateResponse(payjoin::send::ValidationError), + /// Payjoin request failed. + #[error("Payjoin response error.")] + PayjoinResponse(payjoin::send::ResponseError), /// Payjoin configuration error #[error("Payjoin configuration failed.")] PayjoinConfigError, @@ -471,8 +471,8 @@ impl From for MutinyError { } } -impl From for MutinyError { - fn from(e: payjoin::send::ValidationError) -> Self { - Self::PayjoinValidateResponse(e) +impl From for MutinyError { + fn from(e: payjoin::send::ResponseError) -> Self { + Self::PayjoinResponse(e) } } diff --git a/mutiny-wasm/Cargo.toml b/mutiny-wasm/Cargo.toml index ee0df540d..c2e3ec420 100644 --- a/mutiny-wasm/Cargo.toml +++ b/mutiny-wasm/Cargo.toml @@ -41,7 +41,7 @@ getrandom = { version = "0.2", features = ["js"] } futures = "0.3.25" urlencoding = "2.1.2" once_cell = "1.18.0" -payjoin = { version = "0.12.0", features = ["send", "base64"] } +payjoin = { version = "0.13.0", features = ["send", "base64"] } fedimint-core = "0.2.1" # The `console_error_panic_hook` crate provides better debugging of panics by diff --git a/mutiny-wasm/src/error.rs b/mutiny-wasm/src/error.rs index 9bd5739ef..607e02d6e 100644 --- a/mutiny-wasm/src/error.rs +++ b/mutiny-wasm/src/error.rs @@ -147,9 +147,9 @@ pub enum MutinyJsError { /// Payjoin request creation failed. #[error("Failed to create payjoin request.")] PayjoinCreateRequest, - /// Payjoin response validation failed. - #[error("Failed to validate payjoin response.")] - PayjoinValidateResponse, + /// Payjoin request failed. + #[error("Payjoin response error.")] + PayjoinResponse, /// Payjoin configuration error #[error("Payjoin configuration failed.")] PayjoinConfigError, @@ -209,7 +209,7 @@ impl From for MutinyJsError { MutinyError::NetworkMismatch => MutinyJsError::NetworkMismatch, MutinyError::PayjoinConfigError => MutinyJsError::PayjoinConfigError, MutinyError::PayjoinCreateRequest => MutinyJsError::PayjoinCreateRequest, - MutinyError::PayjoinValidateResponse(_) => MutinyJsError::PayjoinValidateResponse, + MutinyError::PayjoinResponse(_) => MutinyJsError::PayjoinResponse, } } }