@cetusprotocol/aggregator-sdk 0.0.0-experimental-20250205211843 → 0.0.0-experimental-20250206124355

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.js CHANGED
@@ -6479,7 +6479,7 @@ var _AggregatorClient = class _AggregatorClient {
6479
6479
  packages
6480
6480
  );
6481
6481
  const priceIDs = findPythPriceIDs(routerData);
6482
- const priceInfoObjectIds = yield this.updatePythPriceIDs(priceIDs, txb);
6482
+ const priceInfoObjectIds = priceIDs.length > 0 ? yield this.updatePythPriceIDs(priceIDs, txb) : /* @__PURE__ */ new Map();
6483
6483
  if (byAmountIn) {
6484
6484
  const targetCoin2 = yield this.expectInputSwap(
6485
6485
  txb,
package/dist/index.mjs CHANGED
@@ -6477,7 +6477,7 @@ var _AggregatorClient = class _AggregatorClient {
6477
6477
  packages
6478
6478
  );
6479
6479
  const priceIDs = findPythPriceIDs(routerData);
6480
- const priceInfoObjectIds = yield this.updatePythPriceIDs(priceIDs, txb);
6480
+ const priceInfoObjectIds = priceIDs.length > 0 ? yield this.updatePythPriceIDs(priceIDs, txb) : /* @__PURE__ */ new Map();
6481
6481
  if (byAmountIn) {
6482
6482
  const targetCoin2 = yield this.expectInputSwap(
6483
6483
  txb,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cetusprotocol/aggregator-sdk",
3
- "version": "0.0.0-experimental-20250205211843",
3
+ "version": "0.0.0-experimental-20250206124355",
4
4
  "sideEffects": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/client.ts CHANGED
@@ -430,7 +430,11 @@ export class AggregatorClient {
430
430
  )
431
431
 
432
432
  const priceIDs = findPythPriceIDs(routerData)
433
- const priceInfoObjectIds = await this.updatePythPriceIDs(priceIDs, txb)
433
+
434
+ const priceInfoObjectIds =
435
+ priceIDs.length > 0
436
+ ? await this.updatePythPriceIDs(priceIDs, txb)
437
+ : new Map<string, string>()
434
438
 
435
439
  if (byAmountIn) {
436
440
  const targetCoin = await this.expectInputSwap(
@@ -33,7 +33,10 @@ describe("router module", () => {
33
33
  keypair = buildTestAccount()
34
34
  }
35
35
 
36
- const wallet = keypair.getPublicKey().toSuiAddress()
36
+ // const wallet = keypair.getPublicKey().toSuiAddress()
37
+ const wallet =
38
+ "0x073dfdcbb5d6552efd954273f7ab9e0b918d7bf30103e3f4e632502289cd92ee"
39
+
37
40
  console.log("wallet: ", wallet)
38
41
 
39
42
  const endpoint = aggregatorURL
@@ -108,7 +111,7 @@ describe("router module", () => {
108
111
 
109
112
  test("Build router tx", async () => {
110
113
  const byAmountIn = true
111
- const amount = "10000000"
114
+ const amount = "100000"
112
115
  const from =
113
116
  "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC"
114
117
  const target = "0x2::sui::SUI"
@@ -119,7 +122,7 @@ describe("router module", () => {
119
122
  amount: new BN(amount),
120
123
  byAmountIn,
121
124
  depth: 3,
122
- providers: ["HAEDALPMM"],
125
+ providers: ["CETUS"],
123
126
  splitCount: 1,
124
127
  })
125
128