@strkfarm/sdk 1.1.77 → 1.1.78

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.
@@ -83508,10 +83508,11 @@ spurious results.`);
83508
83508
  const CACHE_KEY = "xSTRKPrice";
83509
83509
  const existingCacheData = this.getCache(CACHE_KEY);
83510
83510
  if (existingCacheData) return existingCacheData;
83511
+ let AMOUNT = 100;
83511
83512
  const params = {
83512
83513
  sellTokenAddress: this.metadata.additionalInfo.secondaryToken.address.address,
83513
83514
  buyTokenAddress: this.metadata.additionalInfo.mainToken.address.address,
83514
- sellAmount: BigInt(new Web3Number("100", 18).toWei()),
83515
+ sellAmount: BigInt(new Web3Number(AMOUNT.toString(), 18).toWei()),
83515
83516
  takerAddress: this.address.address
83516
83517
  };
83517
83518
  logger2.verbose("getSecondaryTokenPriceRelativeToMain [1]", params);
@@ -83530,7 +83531,7 @@ spurious results.`);
83530
83531
  Web3Number.fromWei(firstQuote.buyAmount.toString(), 18).toFixed(
83531
83532
  6
83532
83533
  )
83533
- );
83534
+ ) / AMOUNT;
83534
83535
  logger2.verbose("getSecondaryTokenPriceRelativeToMain [2]", price);
83535
83536
  this.setCache(CACHE_KEY, price);
83536
83537
  return price;
@@ -19473,10 +19473,11 @@ var SenseiVault = class extends BaseStrategy {
19473
19473
  const CACHE_KEY = "xSTRKPrice";
19474
19474
  const existingCacheData = this.getCache(CACHE_KEY);
19475
19475
  if (existingCacheData) return existingCacheData;
19476
+ let AMOUNT = 100;
19476
19477
  const params = {
19477
19478
  sellTokenAddress: this.metadata.additionalInfo.secondaryToken.address.address,
19478
19479
  buyTokenAddress: this.metadata.additionalInfo.mainToken.address.address,
19479
- sellAmount: BigInt(new Web3Number("100", 18).toWei()),
19480
+ sellAmount: BigInt(new Web3Number(AMOUNT.toString(), 18).toWei()),
19480
19481
  takerAddress: this.address.address
19481
19482
  };
19482
19483
  logger.verbose("getSecondaryTokenPriceRelativeToMain [1]", params);
@@ -19495,7 +19496,7 @@ var SenseiVault = class extends BaseStrategy {
19495
19496
  Web3Number.fromWei(firstQuote.buyAmount.toString(), 18).toFixed(
19496
19497
  6
19497
19498
  )
19498
- );
19499
+ ) / AMOUNT;
19499
19500
  logger.verbose("getSecondaryTokenPriceRelativeToMain [2]", price);
19500
19501
  this.setCache(CACHE_KEY, price);
19501
19502
  return price;
package/dist/index.js CHANGED
@@ -19474,10 +19474,11 @@ var SenseiVault = class extends BaseStrategy {
19474
19474
  const CACHE_KEY = "xSTRKPrice";
19475
19475
  const existingCacheData = this.getCache(CACHE_KEY);
19476
19476
  if (existingCacheData) return existingCacheData;
19477
+ let AMOUNT = 100;
19477
19478
  const params = {
19478
19479
  sellTokenAddress: this.metadata.additionalInfo.secondaryToken.address.address,
19479
19480
  buyTokenAddress: this.metadata.additionalInfo.mainToken.address.address,
19480
- sellAmount: BigInt(new Web3Number("100", 18).toWei()),
19481
+ sellAmount: BigInt(new Web3Number(AMOUNT.toString(), 18).toWei()),
19481
19482
  takerAddress: this.address.address
19482
19483
  };
19483
19484
  logger.verbose("getSecondaryTokenPriceRelativeToMain [1]", params);
@@ -19496,7 +19497,7 @@ var SenseiVault = class extends BaseStrategy {
19496
19497
  Web3Number.fromWei(firstQuote.buyAmount.toString(), 18).toFixed(
19497
19498
  6
19498
19499
  )
19499
- );
19500
+ ) / AMOUNT;
19500
19501
  logger.verbose("getSecondaryTokenPriceRelativeToMain [2]", price);
19501
19502
  this.setCache(CACHE_KEY, price);
19502
19503
  return price;
package/dist/index.mjs CHANGED
@@ -19371,10 +19371,11 @@ var SenseiVault = class extends BaseStrategy {
19371
19371
  const CACHE_KEY = "xSTRKPrice";
19372
19372
  const existingCacheData = this.getCache(CACHE_KEY);
19373
19373
  if (existingCacheData) return existingCacheData;
19374
+ let AMOUNT = 100;
19374
19375
  const params = {
19375
19376
  sellTokenAddress: this.metadata.additionalInfo.secondaryToken.address.address,
19376
19377
  buyTokenAddress: this.metadata.additionalInfo.mainToken.address.address,
19377
- sellAmount: BigInt(new Web3Number("100", 18).toWei()),
19378
+ sellAmount: BigInt(new Web3Number(AMOUNT.toString(), 18).toWei()),
19378
19379
  takerAddress: this.address.address
19379
19380
  };
19380
19381
  logger.verbose("getSecondaryTokenPriceRelativeToMain [1]", params);
@@ -19393,7 +19394,7 @@ var SenseiVault = class extends BaseStrategy {
19393
19394
  Web3Number.fromWei(firstQuote.buyAmount.toString(), 18).toFixed(
19394
19395
  6
19395
19396
  )
19396
- );
19397
+ ) / AMOUNT;
19397
19398
  logger.verbose("getSecondaryTokenPriceRelativeToMain [2]", price);
19398
19399
  this.setCache(CACHE_KEY, price);
19399
19400
  return price;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strkfarm/sdk",
3
- "version": "1.1.77",
3
+ "version": "1.1.78",
4
4
  "description": "STRKFarm TS SDK (Meant for our internal use, but feel free to use it)",
5
5
  "typings": "dist/index.d.ts",
6
6
  "types": "dist/index.d.ts",
@@ -208,10 +208,11 @@ export class SenseiVault extends BaseStrategy<
208
208
  const existingCacheData = this.getCache<number>(CACHE_KEY);
209
209
  if (existingCacheData) return existingCacheData;
210
210
 
211
+ let AMOUNT = 100;
211
212
  const params: QuoteRequest = {
212
213
  sellTokenAddress: this.metadata.additionalInfo.secondaryToken.address.address,
213
214
  buyTokenAddress: this.metadata.additionalInfo.mainToken.address.address,
214
- sellAmount: BigInt(new Web3Number('100', 18).toWei()),
215
+ sellAmount: BigInt(new Web3Number(AMOUNT.toString(), 18).toWei()),
215
216
  takerAddress: this.address.address,
216
217
  };
217
218
  logger.verbose('getSecondaryTokenPriceRelativeToMain [1]', params);
@@ -231,7 +232,7 @@ export class SenseiVault extends BaseStrategy<
231
232
  Web3Number.fromWei(firstQuote.buyAmount.toString(), 18).toFixed(
232
233
  6,
233
234
  ),
234
- );
235
+ ) / AMOUNT;
235
236
  logger.verbose('getSecondaryTokenPriceRelativeToMain [2]', price);
236
237
  this.setCache(CACHE_KEY, price); // cache for 1 min
237
238
  return price;