@0dotxyz/p0-ts-sdk 2.1.0 → 2.1.1

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/dist/index.cjs CHANGED
@@ -49075,7 +49075,12 @@ async function makeUpdateSwbFeedIx(props) {
49075
49075
  seen.add(key);
49076
49076
  return true;
49077
49077
  });
49078
- const swbProgram = await onDemand.AnchorUtils.loadProgramFromConnection(props.connection);
49078
+ const dummyWallet = {
49079
+ publicKey: props.feePayer,
49080
+ signTransaction: async (tx) => tx,
49081
+ signAllTransactions: async (txs) => txs
49082
+ };
49083
+ const swbProgram = await onDemand.AnchorUtils.loadProgramFromConnection(props.connection, dummyWallet);
49079
49084
  const pullFeedInstances = uniqueOracles.map((oracle) => {
49080
49085
  const pullFeed = new onDemand.PullFeed(swbProgram, oracle.key);
49081
49086
  return pullFeed;
@@ -49086,21 +49091,11 @@ async function makeUpdateSwbFeedIx(props) {
49086
49091
  const crossbarClient = new common.CrossbarClient(
49087
49092
  process.env.NEXT_PUBLIC_SWITCHBOARD_CROSSSBAR_API || "https://integrator-crossbar.prod.mrgn.app"
49088
49093
  );
49089
- const gatewayUrls = await crossbarClient.fetchGateways("mainnet");
49090
- if (!gatewayUrls || gatewayUrls.length === 0) {
49091
- throw new Error(`No gateways available for mainnet`);
49092
- }
49093
- const gatewayUrl = gatewayUrls[0];
49094
- if (!gatewayUrl) {
49095
- throw new Error(`Invalid gateway URL received formainnet`);
49096
- }
49097
- const gateway = new onDemand.Gateway(swbProgram, gatewayUrl);
49098
49094
  const [pullIx, luts] = await onDemand.PullFeed.fetchUpdateManyIx(swbProgram, {
49099
49095
  feeds: pullFeedInstances,
49100
- gateway: gateway.gatewayUrl,
49101
49096
  numSignatures: 1,
49102
- payer: props.feePayer,
49103
- crossbarClient
49097
+ crossbarClient,
49098
+ payer: props.feePayer
49104
49099
  });
49105
49100
  return { instructions: pullIx, luts };
49106
49101
  }