Skip to content

Commit cf9c847

Browse files
ts: Pass instructions to state rpcs
1 parent bf8d765 commit cf9c847

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ts/src/rpc.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ export class RpcFactory {
246246
rpc[m.name] = async (...args: any[]): Promise<TransactionSignature> => {
247247
const [_, ctx] = splitArgsAndCtx(m, [...args]);
248248
const tx = new Transaction();
249+
if (ctx.instructions !== undefined) {
250+
tx.add(...ctx.instructions);
251+
}
249252
tx.add(await ix[m.name](...args));
250253
try {
251254
const txSig = await provider.send(tx, ctx.signers, ctx.options);

0 commit comments

Comments
 (0)