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).
This commit is contained in:
jwinterm
2026-06-07 16:45:53 -04:00
parent 62fc9421f1
commit 9bf11fbc8d
+2 -1
View File
@@ -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)?;