Skip to content

Commit

Permalink
refactor(sdk): add oracle feeds to crank for withdrawal request
Browse files Browse the repository at this point in the history
  • Loading branch information
ChesterSim committed Nov 20, 2024
1 parent 85e50da commit 63c3167
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ts/sdk/src/vaultClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -1568,7 +1572,10 @@ export class VaultClient {
}
);

return await this.createAndSendTxn([requestWithdrawIx], txParams);
return await this.createAndSendTxn(
[...oracleFeedsToCrankIxs, requestWithdrawIx],
txParams
);
}
}

Expand Down

0 comments on commit 63c3167

Please sign in to comment.