@gearbox-protocol/sdk 3.0.0-vfour.106 → 3.0.0-vfour.107

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.
@@ -27622,11 +27622,14 @@ var GaugeStakingService = class extends SDKConstruct {
27622
27622
  acc[v.addr] = {
27623
27623
  pool: v.pool,
27624
27624
  gauge: v.addr,
27625
- quotaParams: v.quotaParams.map((q) => ({
27626
- token: q.token,
27627
- stakerVotesLpSide: q.stakerVotesLpSide,
27628
- stakerVotesCaSide: q.stakerVotesCaSide
27629
- }))
27625
+ quotaParams: v.quotaParams.reduce((acc2, q) => {
27626
+ acc2[q.token] = {
27627
+ token: q.token,
27628
+ stakerVotesLpSide: q.stakerVotesLpSide,
27629
+ stakerVotesCaSide: q.stakerVotesCaSide
27630
+ };
27631
+ return acc2;
27632
+ }, {})
27630
27633
  };
27631
27634
  return acc;
27632
27635
  },
@@ -27665,11 +27668,15 @@ var GaugeStakingData = class {
27665
27668
  acc[gaugeLc] = {
27666
27669
  gauge: gaugeLc,
27667
27670
  pool: v.pool.toLowerCase(),
27668
- quotaParams: v.quotaParams.map((q) => ({
27669
- token: q.token.toLowerCase(),
27670
- stakerVotesLpSide: q.stakerVotesLpSide,
27671
- stakerVotesCaSide: q.stakerVotesCaSide
27672
- }))
27671
+ quotaParams: Object.values(v.quotaParams).reduce((acc2, q) => {
27672
+ const tokenLc = q.token.toLowerCase();
27673
+ acc2[tokenLc] = {
27674
+ token: tokenLc,
27675
+ stakerVotesLpSide: q.stakerVotesLpSide,
27676
+ stakerVotesCaSide: q.stakerVotesCaSide
27677
+ };
27678
+ return acc2;
27679
+ }, {})
27673
27680
  };
27674
27681
  return acc;
27675
27682
  }, {});
@@ -30773,7 +30773,7 @@ interface UserVote {
30773
30773
  interface GaugeVoteInfo {
30774
30774
  pool: Address;
30775
30775
  gauge: Address;
30776
- quotaParams: Array<UserVote>;
30776
+ quotaParams: Record<Address, UserVote>;
30777
30777
  }
30778
30778
  interface GaugeStakingDataPayload {
30779
30779
  availableBalance: bigint;
@@ -30773,7 +30773,7 @@ interface UserVote {
30773
30773
  interface GaugeVoteInfo {
30774
30774
  pool: Address;
30775
30775
  gauge: Address;
30776
- quotaParams: Array<UserVote>;
30776
+ quotaParams: Record<Address, UserVote>;
30777
30777
  }
30778
30778
  interface GaugeStakingDataPayload {
30779
30779
  availableBalance: bigint;
@@ -27620,11 +27620,14 @@ var GaugeStakingService = class extends SDKConstruct {
27620
27620
  acc[v.addr] = {
27621
27621
  pool: v.pool,
27622
27622
  gauge: v.addr,
27623
- quotaParams: v.quotaParams.map((q) => ({
27624
- token: q.token,
27625
- stakerVotesLpSide: q.stakerVotesLpSide,
27626
- stakerVotesCaSide: q.stakerVotesCaSide
27627
- }))
27623
+ quotaParams: v.quotaParams.reduce((acc2, q) => {
27624
+ acc2[q.token] = {
27625
+ token: q.token,
27626
+ stakerVotesLpSide: q.stakerVotesLpSide,
27627
+ stakerVotesCaSide: q.stakerVotesCaSide
27628
+ };
27629
+ return acc2;
27630
+ }, {})
27628
27631
  };
27629
27632
  return acc;
27630
27633
  },
@@ -27663,11 +27666,15 @@ var GaugeStakingData = class {
27663
27666
  acc[gaugeLc] = {
27664
27667
  gauge: gaugeLc,
27665
27668
  pool: v.pool.toLowerCase(),
27666
- quotaParams: v.quotaParams.map((q) => ({
27667
- token: q.token.toLowerCase(),
27668
- stakerVotesLpSide: q.stakerVotesLpSide,
27669
- stakerVotesCaSide: q.stakerVotesCaSide
27670
- }))
27669
+ quotaParams: Object.values(v.quotaParams).reduce((acc2, q) => {
27670
+ const tokenLc = q.token.toLowerCase();
27671
+ acc2[tokenLc] = {
27672
+ token: tokenLc,
27673
+ stakerVotesLpSide: q.stakerVotesLpSide,
27674
+ stakerVotesCaSide: q.stakerVotesCaSide
27675
+ };
27676
+ return acc2;
27677
+ }, {})
27671
27678
  };
27672
27679
  return acc;
27673
27680
  }, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-vfour.106",
3
+ "version": "3.0.0-vfour.107",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.cjs",