Skip to content

Commit 46fee13

Browse files
committed
Fix CloseSwapAccountIfEmptyInstruction to include destination account
1 parent b1f1073 commit 46fee13

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/solana/cvm/instructions_close_swap_account_if_empty.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type CloseSwapAccountIfEmptyInstructionAccounts struct {
2020
Swapper ed25519.PublicKey
2121
SwapPda ed25519.PublicKey
2222
SwapAta ed25519.PublicKey
23+
Destination ed25519.PublicKey
2324
}
2425

2526
func NewCloseSwapAccountIfEmptyInstruction(
@@ -67,6 +68,11 @@ func NewCloseSwapAccountIfEmptyInstruction(
6768
IsWritable: true,
6869
IsSigner: false,
6970
},
71+
{
72+
PublicKey: accounts.Destination,
73+
IsWritable: true,
74+
IsSigner: false,
75+
},
7076
{
7177
PublicKey: SPL_TOKEN_PROGRAM_ID,
7278
IsWritable: false,

0 commit comments

Comments
 (0)