@gearbox-protocol/sdk 13.0.0-beta.8 → 13.0.0-beta.9
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.
|
@@ -180,18 +180,17 @@ class CreditAccountServiceV310 extends import_AbstractCreditAccountsService.Abst
|
|
|
180
180
|
* Implements {@link ICreditAccountsService.claimFarmRewards}
|
|
181
181
|
*/
|
|
182
182
|
async claimFarmRewards({
|
|
183
|
-
calls:
|
|
183
|
+
calls: externalCalls,
|
|
184
184
|
creditAccount: ca,
|
|
185
185
|
minQuota,
|
|
186
186
|
averageQuota,
|
|
187
|
-
tokensToClaim
|
|
188
|
-
forceCalls
|
|
187
|
+
tokensToClaim
|
|
189
188
|
}) {
|
|
190
189
|
const cm = this.sdk.marketRegister.findCreditManager(ca.creditManager);
|
|
191
190
|
const router = this.sdk.routerFor(ca);
|
|
192
191
|
let claimPath;
|
|
193
|
-
if (
|
|
194
|
-
claimPath = { calls:
|
|
192
|
+
if (externalCalls) {
|
|
193
|
+
claimPath = { calls: externalCalls };
|
|
195
194
|
} else {
|
|
196
195
|
claimPath = await router.findClaimAllRewards({
|
|
197
196
|
tokensToClaim,
|
|
@@ -157,18 +157,17 @@ class CreditAccountServiceV310 extends AbstractCreditAccountService {
|
|
|
157
157
|
* Implements {@link ICreditAccountsService.claimFarmRewards}
|
|
158
158
|
*/
|
|
159
159
|
async claimFarmRewards({
|
|
160
|
-
calls:
|
|
160
|
+
calls: externalCalls,
|
|
161
161
|
creditAccount: ca,
|
|
162
162
|
minQuota,
|
|
163
163
|
averageQuota,
|
|
164
|
-
tokensToClaim
|
|
165
|
-
forceCalls
|
|
164
|
+
tokensToClaim
|
|
166
165
|
}) {
|
|
167
166
|
const cm = this.sdk.marketRegister.findCreditManager(ca.creditManager);
|
|
168
167
|
const router = this.sdk.routerFor(ca);
|
|
169
168
|
let claimPath;
|
|
170
|
-
if (
|
|
171
|
-
claimPath = { calls:
|
|
169
|
+
if (externalCalls) {
|
|
170
|
+
claimPath = { calls: externalCalls };
|
|
172
171
|
} else {
|
|
173
172
|
claimPath = await router.findClaimAllRewards({
|
|
174
173
|
tokensToClaim,
|
|
@@ -20,7 +20,7 @@ export declare class CreditAccountServiceV310 extends AbstractCreditAccountServi
|
|
|
20
20
|
/**
|
|
21
21
|
* Implements {@link ICreditAccountsService.claimFarmRewards}
|
|
22
22
|
*/
|
|
23
|
-
claimFarmRewards({ calls:
|
|
23
|
+
claimFarmRewards({ calls: externalCalls, creditAccount: ca, minQuota, averageQuota, tokensToClaim, }: ClaimFarmRewardsProps): Promise<CreditAccountOperationResult>;
|
|
24
24
|
previewWithdrawLlamathenaProportionally(_: PreviewWithdrawLlamathenaProportionallyProps): Promise<PreviewWithdrawLlamathenaProportionallyResult>;
|
|
25
25
|
withdrawLlamathenaProportionally(_: LlamathenaProportionalWithdrawProps): Promise<CreditAccountOperationResult>;
|
|
26
26
|
}
|
|
@@ -235,15 +235,17 @@ export interface ClaimFarmRewardsProps extends PrepareUpdateQuotasProps {
|
|
|
235
235
|
*/
|
|
236
236
|
tokensToDisable: Array<Asset>;
|
|
237
237
|
/**
|
|
238
|
-
*
|
|
238
|
+
* External calls to execute instead of finding claim path
|
|
239
239
|
*/
|
|
240
|
-
calls: Array<MultiCall
|
|
240
|
+
calls: Array<MultiCall> | undefined;
|
|
241
241
|
/**
|
|
242
242
|
* minimal credit account data on which operation is performed
|
|
243
243
|
*/
|
|
244
244
|
creditAccount: RouterCASlice;
|
|
245
|
+
/**
|
|
246
|
+
* List of token rewards of which we want to claim
|
|
247
|
+
*/
|
|
245
248
|
tokensToClaim: Asset[];
|
|
246
|
-
forceCalls?: boolean;
|
|
247
249
|
}
|
|
248
250
|
export interface OpenCAProps extends PrepareUpdateQuotasProps {
|
|
249
251
|
/**
|