mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 07:11:36 +02:00
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:
@@ -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)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user