@lavarage/sdk 8.0.1 → 8.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/crossbar.ts CHANGED
@@ -2,7 +2,7 @@ import { NATIVE_MINT } from "@solana/spl-token";
2
2
  import { USDC_MINT } from "./constants";
3
3
  import { Program } from "@coral-xyz/anchor";
4
4
  import { PublicKey, TransactionInstruction } from "@solana/web3.js";
5
- import { getQueue } from "@switchboard-xyz/on-demand";
5
+ import { getQueue, isMainnetConnection, ON_DEMAND_DEVNET_QUEUE, ON_DEMAND_MAINNET_QUEUE } from "@switchboard-xyz/on-demand";
6
6
  import { CrossbarClient } from "@switchboard-xyz/common";
7
7
  import { retryWithBackoff } from "./utils";
8
8
  import { Lavarage as LavarageSOL } from "./idl/lavarageSOL";
@@ -38,6 +38,7 @@ export async function getUpdateOracleIxs(program: Program<LavarageSOL | Lavarage
38
38
  const queue = await getQueue({
39
39
  // @ts-expect-error @coral-xyz/anchor versions mismatch
40
40
  program,
41
+ queueAddress: await isMainnetConnection(program.provider.connection) ? ON_DEMAND_MAINNET_QUEUE : ON_DEMAND_DEVNET_QUEUE,
41
42
  });
42
43
 
43
44
  return await retryWithBackoff(async () => await queue.fetchManagedUpdateIxs(
package/dist/index.js CHANGED
@@ -2282,7 +2282,8 @@ function getUpdateOracleIxs(program, feedId, payer, apiKeys) {
2282
2282
  return __async(this, null, function* () {
2283
2283
  const queue = yield (0, import_on_demand2.getQueue)({
2284
2284
  // @ts-expect-error @coral-xyz/anchor versions mismatch
2285
- program
2285
+ program,
2286
+ queueAddress: (yield (0, import_on_demand2.isMainnetConnection)(program.provider.connection)) ? import_on_demand2.ON_DEMAND_MAINNET_QUEUE : import_on_demand2.ON_DEMAND_DEVNET_QUEUE
2286
2287
  });
2287
2288
  return yield retryWithBackoff(() => __async(null, null, function* () {
2288
2289
  return yield queue.fetchManagedUpdateIxs(