@gearbox-protocol/sdk 10.4.4 → 10.4.5

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.
@@ -146,11 +146,6 @@ class RouterV310Contract extends import_AbstractRouterContract.AbstractRouterCon
146
146
  * Implements {@link IRouterContract.findClaimAllRewards}
147
147
  */
148
148
  async findClaimAllRewards(props) {
149
- if (props.calls.length > 0 && !!props.forceCalls) {
150
- return {
151
- calls: [...props.calls]
152
- };
153
- }
154
149
  const tData = props.tokensToClaim.map((a) => ({
155
150
  balance: 0n,
156
151
  claimRewards: true,
@@ -162,6 +157,11 @@ class RouterV310Contract extends import_AbstractRouterContract.AbstractRouterCon
162
157
  props.creditAccount.creditAccount,
163
158
  tData
164
159
  ]);
160
+ if (props.calls.length > 0 && result.length === 0 && !!props.forceCalls) {
161
+ return {
162
+ calls: [...props.calls]
163
+ };
164
+ }
165
165
  return {
166
166
  calls: [...result]
167
167
  };
@@ -123,11 +123,6 @@ class RouterV310Contract extends AbstractRouterContract {
123
123
  * Implements {@link IRouterContract.findClaimAllRewards}
124
124
  */
125
125
  async findClaimAllRewards(props) {
126
- if (props.calls.length > 0 && !!props.forceCalls) {
127
- return {
128
- calls: [...props.calls]
129
- };
130
- }
131
126
  const tData = props.tokensToClaim.map((a) => ({
132
127
  balance: 0n,
133
128
  claimRewards: true,
@@ -139,6 +134,11 @@ class RouterV310Contract extends AbstractRouterContract {
139
134
  props.creditAccount.creditAccount,
140
135
  tData
141
136
  ]);
137
+ if (props.calls.length > 0 && result.length === 0 && !!props.forceCalls) {
138
+ return {
139
+ calls: [...props.calls]
140
+ };
141
+ }
142
142
  return {
143
143
  calls: [...result]
144
144
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "10.4.4",
3
+ "version": "10.4.5",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",