Skip to content

Commit 581c59d

Browse files
committed
change target base ix ordering
1 parent ec2bec3 commit 581c59d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

sdk/src/driftClient.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11208,20 +11208,30 @@ export class DriftClient {
1120811208

1120911209
ixs.push(await this.getUpdateAmmCacheIx(perpMarketIndexes));
1121011210

11211+
const constituents: ConstituentAccount[] = Array.from(
11212+
constituentMap.values()
11213+
);
11214+
11215+
if (includeUpdateConstituentOracleInfo) {
11216+
for (const constituent of constituents) {
11217+
ixs.push(await this.getUpdateConstituentOracleInfoIx(constituent));
11218+
}
11219+
}
11220+
1121111221
ixs.push(
1121211222
await this.getUpdateLpConstituentTargetBaseIx(
1121311223
lpPool.name,
1121411224
Array.from(constituentMap.values()).map(
1121511225
(constituent) => constituent.pubkey
1121611226
)
1121711227
)
11218-
);
11228+
);
1121911229

1122011230
ixs.push(
1122111231
...(await this.getAllUpdateLpPoolAumIxs(
1122211232
lpPool,
1122311233
constituentMap,
11224-
includeUpdateConstituentOracleInfo
11234+
false
1122511235
))
1122611236
);
1122711237

0 commit comments

Comments
 (0)