Fix pay-to-self Accounts bug (#2682)
* Add failing tests * Fix tests * Plumb AccountLoadedTwice error * Fixup budget cancel actions to not depend on duplicate accounts * Use has_duplicates * Update budget-based golden
This commit is contained in:
@ -85,9 +85,13 @@ impl BudgetTransaction {
|
||||
last_id: Hash,
|
||||
) -> Transaction {
|
||||
let instruction = Instruction::ApplySignature;
|
||||
let mut keys = vec![contract];
|
||||
if from_keypair.pubkey() != to {
|
||||
keys.push(to);
|
||||
}
|
||||
Transaction::new(
|
||||
from_keypair,
|
||||
&[contract, to],
|
||||
&keys,
|
||||
budget_program::id(),
|
||||
&instruction,
|
||||
last_id,
|
||||
|
Reference in New Issue
Block a user