From 63c31671abe6bf4f85de8fe126031bd180e7d384 Mon Sep 17 00:00:00 2001 From: Chester Sim Date: Wed, 20 Nov 2024 11:20:35 +0800 Subject: [PATCH] refactor(sdk): add oracle feeds to crank for withdrawal request --- ts/sdk/src/vaultClient.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ts/sdk/src/vaultClient.ts b/ts/sdk/src/vaultClient.ts index f93f74f..08d294c 100644 --- a/ts/sdk/src/vaultClient.ts +++ b/ts/sdk/src/vaultClient.ts @@ -1555,6 +1555,10 @@ export class VaultClient { .remainingAccounts(remainingAccounts) .rpc(); } else { + const oracleFeedsToCrankIxs = await this.getOracleFeedsToCrank( + txParams?.oracleFeedsToCrank + ); + const requestWithdrawIx = this.program.instruction.requestWithdraw( // @ts-ignore amount, @@ -1568,7 +1572,10 @@ export class VaultClient { } ); - return await this.createAndSendTxn([requestWithdrawIx], txParams); + return await this.createAndSendTxn( + [...oracleFeedsToCrankIxs, requestWithdrawIx], + txParams + ); } }