@strkfarm/sdk 1.1.55 → 1.1.56

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.
@@ -80582,8 +80582,9 @@ spurious results.`);
80582
80582
  const ekuboHarvests = new EkuboHarvests(this.config);
80583
80583
  return await ekuboHarvests.getUnHarvestedRewards(this.address);
80584
80584
  }
80585
- async harvest(acc, maxIterations = 20, priceRatioPrecision = 4) {
80586
- const pendingRewards = await this.getPendingRewards();
80585
+ async harvest(acc, maxIterations = 20, priceRatioPrecision = 4, minRewardAmount = new Web3Number(0, 18)) {
80586
+ const _pendingRewards = await this.getPendingRewards();
80587
+ const pendingRewards = _pendingRewards.filter((claim) => claim.actualReward.greaterThanOrEqualTo(minRewardAmount));
80587
80588
  if (pendingRewards.length == 0) {
80588
80589
  logger2.verbose(`${_EkuboCLVault.name}: harvest => no pending rewards found`);
80589
80590
  return [];
@@ -16659,8 +16659,9 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
16659
16659
  const ekuboHarvests = new EkuboHarvests(this.config);
16660
16660
  return await ekuboHarvests.getUnHarvestedRewards(this.address);
16661
16661
  }
16662
- async harvest(acc, maxIterations = 20, priceRatioPrecision = 4) {
16663
- const pendingRewards = await this.getPendingRewards();
16662
+ async harvest(acc, maxIterations = 20, priceRatioPrecision = 4, minRewardAmount = new Web3Number(0, 18)) {
16663
+ const _pendingRewards = await this.getPendingRewards();
16664
+ const pendingRewards = _pendingRewards.filter((claim) => claim.actualReward.greaterThanOrEqualTo(minRewardAmount));
16664
16665
  if (pendingRewards.length == 0) {
16665
16666
  logger.verbose(`${_EkuboCLVault.name}: harvest => no pending rewards found`);
16666
16667
  return [];
package/dist/index.d.ts CHANGED
@@ -836,7 +836,7 @@ declare class EkuboCLVault extends BaseStrategy<DualTokenInfo, DualActionAmount>
836
836
  amount1: Web3Number;
837
837
  }>;
838
838
  getPendingRewards(): Promise<HarvestInfo[]>;
839
- harvest(acc: Account, maxIterations?: number, priceRatioPrecision?: number): Promise<Call[]>;
839
+ harvest(acc: Account, maxIterations?: number, priceRatioPrecision?: number, minRewardAmount?: Web3Number): Promise<Call[]>;
840
840
  /**
841
841
  * @description This funciton requires atleast one of the pool tokens to be reward token
842
842
  * i.e. STRK.
package/dist/index.js CHANGED
@@ -16659,8 +16659,9 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
16659
16659
  const ekuboHarvests = new EkuboHarvests(this.config);
16660
16660
  return await ekuboHarvests.getUnHarvestedRewards(this.address);
16661
16661
  }
16662
- async harvest(acc, maxIterations = 20, priceRatioPrecision = 4) {
16663
- const pendingRewards = await this.getPendingRewards();
16662
+ async harvest(acc, maxIterations = 20, priceRatioPrecision = 4, minRewardAmount = new Web3Number(0, 18)) {
16663
+ const _pendingRewards = await this.getPendingRewards();
16664
+ const pendingRewards = _pendingRewards.filter((claim) => claim.actualReward.greaterThanOrEqualTo(minRewardAmount));
16664
16665
  if (pendingRewards.length == 0) {
16665
16666
  logger.verbose(`${_EkuboCLVault.name}: harvest => no pending rewards found`);
16666
16667
  return [];
package/dist/index.mjs CHANGED
@@ -16557,8 +16557,9 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
16557
16557
  const ekuboHarvests = new EkuboHarvests(this.config);
16558
16558
  return await ekuboHarvests.getUnHarvestedRewards(this.address);
16559
16559
  }
16560
- async harvest(acc, maxIterations = 20, priceRatioPrecision = 4) {
16561
- const pendingRewards = await this.getPendingRewards();
16560
+ async harvest(acc, maxIterations = 20, priceRatioPrecision = 4, minRewardAmount = new Web3Number(0, 18)) {
16561
+ const _pendingRewards = await this.getPendingRewards();
16562
+ const pendingRewards = _pendingRewards.filter((claim) => claim.actualReward.greaterThanOrEqualTo(minRewardAmount));
16562
16563
  if (pendingRewards.length == 0) {
16563
16564
  logger.verbose(`${_EkuboCLVault.name}: harvest => no pending rewards found`);
16564
16565
  return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strkfarm/sdk",
3
- "version": "1.1.55",
3
+ "version": "1.1.56",
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",
@@ -1602,8 +1602,9 @@ export class EkuboCLVault extends BaseStrategy<
1602
1602
  return await ekuboHarvests.getUnHarvestedRewards(this.address);
1603
1603
  }
1604
1604
 
1605
- async harvest(acc: Account, maxIterations = 20, priceRatioPrecision = 4): Promise<Call[]> {
1606
- const pendingRewards = await this.getPendingRewards();
1605
+ async harvest(acc: Account, maxIterations = 20, priceRatioPrecision = 4, minRewardAmount: Web3Number = new Web3Number(0, 18)): Promise<Call[]> {
1606
+ const _pendingRewards = await this.getPendingRewards();
1607
+ const pendingRewards = _pendingRewards.filter(claim => claim.actualReward.greaterThanOrEqualTo(minRewardAmount));
1607
1608
  if (pendingRewards.length == 0) {
1608
1609
  logger.verbose(`${EkuboCLVault.name}: harvest => no pending rewards found`);
1609
1610
  return [];