@haven-fi/solauto-sdk 1.0.797 → 1.0.798

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.
@@ -1 +1 @@
1
- {"version":3,"file":"switchboardUtils.d.ts","sourceRoot":"","sources":["../../src/utils/switchboardUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAGV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAsB,MAAM,0BAA0B,CAAC;AAGtE,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAC;AAIvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAQjD,wBAAsB,WAAW,CAC/B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,SAAS,EACf,MAAM,CAAC,EAAE,SAAS,8BA0BnB;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CA0C5C;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,SAAS,EAAE,GACjB,OAAO,CAAC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC,CAuB/D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,WAEzD"}
1
+ {"version":3,"file":"switchboardUtils.d.ts","sourceRoot":"","sources":["../../src/utils/switchboardUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAGV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAsB,MAAM,0BAA0B,CAAC;AAGtE,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAC;AAIvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAQjD,wBAAsB,WAAW,CAC/B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,SAAS,EACf,MAAM,CAAC,EAAE,SAAS,8BA0BnB;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CA6C5C;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,SAAS,EAAE,GACjB,OAAO,CAAC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC,CAuB/D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,WAEzD"}
@@ -75,7 +75,9 @@ async function buildSwbSubmitResponseTx(conn, signer, mint) {
75
75
  if (!pullIxs || !pullIxs.length) {
76
76
  throw new Error("Unable to fetch SWB crank IX");
77
77
  }
78
+ (0, generalUtils_1.consoleLog)("Setting price locally...");
78
79
  const price = responses[0].value.toNumber();
80
+ (0, generalUtils_1.consoleLog)(price);
79
81
  constants_1.PRICES[mint.toString()] = {
80
82
  realtimePrice: price,
81
83
  confInterval: 0,
@@ -83,6 +85,7 @@ async function buildSwbSubmitResponseTx(conn, signer, mint) {
83
85
  emaConfInterval: 0,
84
86
  time: (0, generalUtils_1.currentUnixSeconds)(),
85
87
  };
88
+ (0, generalUtils_1.consoleLog)("Returning SWB transaction data...");
86
89
  return {
87
90
  tx: (0, umi_1.transactionBuilder)(pullIxs.map((x) => (0, solanaUtils_1.getWrappedInstruction)(signer, x))),
88
91
  lookupTableAddresses: responses
@@ -30,7 +30,7 @@ import {
30
30
  import { getSecretKey } from "./shared";
31
31
  import { NATIVE_MINT } from "@solana/spl-token";
32
32
 
33
- const payForTransaction = true;
33
+ const payForTransaction = false;
34
34
  const testProgram = false;
35
35
  const lpEnv: ProgramEnv = "Prod";
36
36
 
@@ -80,7 +80,7 @@ export async function main() {
80
80
 
81
81
  const txManager = new ClientTransactionsManager({
82
82
  txHandler: client,
83
- txRunType: "skip-simulation",
83
+ txRunType: payForTransaction ? "normal" : "only-simulate",
84
84
  priorityFeeSetting: PriorityFeeSetting.Default,
85
85
  retryConfig: { totalRetries: 2 },
86
86
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.797",
3
+ "version": "1.0.798",
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",
@@ -78,7 +78,9 @@ export async function buildSwbSubmitResponseTx(
78
78
  throw new Error("Unable to fetch SWB crank IX");
79
79
  }
80
80
 
81
+ consoleLog("Setting price locally...");
81
82
  const price = (responses[0].value as Big).toNumber();
83
+ consoleLog(price);
82
84
  PRICES[mint.toString()] = {
83
85
  realtimePrice: price,
84
86
  confInterval: 0,
@@ -87,6 +89,7 @@ export async function buildSwbSubmitResponseTx(
87
89
  time: currentUnixSeconds(),
88
90
  };
89
91
 
92
+ consoleLog("Returning SWB transaction data...");
90
93
  return {
91
94
  tx: transactionBuilder(
92
95
  pullIxs.map((x) => getWrappedInstruction(signer, x))