From 9bf11fbc8d7c955d29d671f9fd3352814bf67d57 Mon Sep 17 00:00:00 2001 From: jwinterm Date: Sun, 7 Jun 2026 16:45:53 -0400 Subject: [PATCH] Contracts: derive the proof address under the contract's account generate_invoice_signature derived the receiver's proof address from the active account's parent key. Like the output-derivation fix, use context.parent_key_id so the proof address belongs to the contract's account, not whatever account is active. Addresses PR #754 review (proofs.rs, utils.rs). --- libwallet/src/contract/proofs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libwallet/src/contract/proofs.rs b/libwallet/src/contract/proofs.rs index d471e31..9ec9247 100644 --- a/libwallet/src/contract/proofs.rs +++ b/libwallet/src/contract/proofs.rs @@ -410,7 +410,8 @@ where Some(i) => i, None => 0, }; - let parent_key_id = wallet.parent_key_id(); + // Derive the proof address under the contract's account, not the active one. + let parent_key_id = context.parent_key_id.clone(); let recp_key = address::address_from_derivation_path(&keychain, &parent_key_id, derivation_index)?;