Skip to content

Commit cce1f1c

Browse files
committed
minimal changes necessary for sbod
1 parent 83a3b2d commit cce1f1c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ts/client/src/accounts/oracle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ export function isOracleStaleOrUnconfident(
434434
}
435435
if (debug && deviation) {
436436
console.log(
437-
`- ${debugPrefix?.padStart(30)}: deviation within confidence tolerance ${deviation.mul(I80F48.fromNumber(100)).div(confFilter).toFixed(3)}%`,
437+
`- ${debugPrefix?.padStart(30)}: deviation within confidence tolerance ${deviation.div(price).mul(I80F48.fromNumber(100)).toFixed(3)}%`,
438438
);
439439
}
440440

ts/client/src/utils/rpc.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,15 @@ export const createComputeBudgetIx = (
288288
return computeBudgetIx;
289289
};
290290

291+
export const createComputeLimitIx = (
292+
units: number,
293+
): TransactionInstruction => {
294+
const computeBudgetIx = ComputeBudgetProgram.setComputeUnitLimit({
295+
units,
296+
});
297+
return computeBudgetIx;
298+
};
299+
291300
export class MangoError extends Error {
292301
message: string;
293302
txid: string;

0 commit comments

Comments
 (0)