Skip to content

Commit 71aac65

Browse files
committed
test: instruction params account is closed
Signed-off-by: Reinis Martinsons <reinis@umaproject.org>
1 parent 50cfd90 commit 71aac65

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/svm/SvmSpoke.Bundle.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,23 @@ describe("svm_spoke.bundle", () => {
241241
program: program.programId,
242242
};
243243
const proofAsNumbers = proof.map((p) => Array.from(p));
244-
await loadExecuteRelayerRefundLeafParams(program, owner, stateAccountData.rootBundleId, leaf, proofAsNumbers);
244+
const instructionParams = await loadExecuteRelayerRefundLeafParams(
245+
program,
246+
owner,
247+
stateAccountData.rootBundleId,
248+
leaf,
249+
proofAsNumbers
250+
);
245251
const tx = await program.methods
246252
.executeRelayerRefundLeaf()
247253
.accounts(executeRelayerRefundLeafAccounts)
248254
.remainingAccounts(remainingAccounts)
249255
.rpc();
250256

257+
// Verify the instruction params account has been automatically closed.
258+
const instructionParamsInfo = await program.provider.connection.getAccountInfo(instructionParams);
259+
assert.isNull(instructionParamsInfo, "Instruction params account should be closed");
260+
251261
// Verify the ExecutedRelayerRefundRoot event
252262
let events = await readEventsUntilFound(connection, tx, [program]);
253263
let event = events.find((event) => event.name === "executedRelayerRefundRoot")?.data;

0 commit comments

Comments
 (0)