@haven-fi/solauto-sdk 1.0.389 → 1.0.391

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.
@@ -68,7 +68,7 @@ async function getSwitchboardPrices(mints) {
68
68
  if (mints.length === 0) {
69
69
  return [];
70
70
  }
71
- const crossbar = new on_demand_1.CrossbarClient("https://crossbar.switchboard.xyz");
71
+ const crossbar = on_demand_1.CrossbarClient.default();
72
72
  let prices = [];
73
73
  try {
74
74
  prices = await (0, generalUtils_1.retryWithExponentialBackoff)(async () => {
@@ -25,7 +25,7 @@ function getPullFeed(conn, mint, wallet) {
25
25
  return new on_demand_1.PullFeed(program, new web3_js_1.PublicKey(switchboardConstants_1.SWITCHBOARD_PRICE_FEED_IDS[mint.toString()]));
26
26
  }
27
27
  async function buildSwbSubmitResponseTx(conn, signer, mint) {
28
- const crossbar = new on_demand_1.CrossbarClient("https://crossbar.switchboard.xyz");
28
+ const crossbar = on_demand_1.CrossbarClient.default();
29
29
  const feed = getPullFeed(conn, mint, (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(signer.publicKey));
30
30
  const [pullIx, responses] = await (0, generalUtils_1.retryWithExponentialBackoff)(async () => await feed.fetchUpdateIx({
31
31
  crossbarClient: crossbar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.389",
3
+ "version": "1.0.391",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Typescript SDK for the Solauto program on the Solana blockchain",
@@ -23,7 +23,7 @@
23
23
  "@mrgnlabs/mrgn-common": "^1.8.0",
24
24
  "@solana/spl-token": "^0.4.0",
25
25
  "@solana/web3.js": "=1.95.8",
26
- "@switchboard-xyz/on-demand": "^1.2.51",
26
+ "@switchboard-xyz/on-demand": "=1.2.51",
27
27
  "axios": "^1.7.8",
28
28
  "bs58": "^5.0.0",
29
29
  "cross-fetch": "^4.0.0",
@@ -101,7 +101,7 @@ export async function getSwitchboardPrices(
101
101
  return [];
102
102
  }
103
103
 
104
- const crossbar = new CrossbarClient("https://crossbar.switchboard.xyz");
104
+ const crossbar = CrossbarClient.default();
105
105
 
106
106
  let prices: number[] = [];
107
107
  try {
@@ -48,7 +48,7 @@ export async function buildSwbSubmitResponseTx(
48
48
  signer: Signer,
49
49
  mint: PublicKey
50
50
  ): Promise<TransactionItemInputs | undefined> {
51
- const crossbar = new CrossbarClient("https://crossbar.switchboard.xyz");
51
+ const crossbar = CrossbarClient.default();
52
52
  const feed = getPullFeed(conn, mint, toWeb3JsPublicKey(signer.publicKey));
53
53
  const [pullIx, responses] = await retryWithExponentialBackoff(
54
54
  async () =>
@@ -133,7 +133,7 @@ describe("Solauto Marginfi tests", async () => {
133
133
  // );
134
134
  // console.log(stateKeverage);
135
135
 
136
- // console.log(await getJupTokenPrices([new PublicKey(HMTR)]));
136
+ console.log(await fetchTokenPrices([new PublicKey(HMTR)]));
137
137
 
138
138
  const transactionItems: TransactionItem[] = [];
139
139
  // const settingParams: SolautoSettingsParametersInpArgs = {