@glowlabs-org/utils 0.2.97 → 0.2.98
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.
- package/dist/cjs/farms-router-CDsqKkP6.js.map +1 -1
- package/dist/cjs/lib/types/index.d.ts +1 -30
- package/dist/esm/farms-router-Da1P3B8g.js.map +1 -1
- package/dist/esm/lib/types/index.d.ts +1 -30
- package/package.json +1 -1
- package/src/lib/control-api/farms-router.ts +10 -10
- package/src/lib/types/index.ts +1 -31
|
@@ -389,10 +389,7 @@ export interface EstimateRewardScoreParams {
|
|
|
389
389
|
protocolDepositAmount: string;
|
|
390
390
|
paymentCurrency: PaymentCurrency;
|
|
391
391
|
adjustedWeeklyCarbonCredits: number;
|
|
392
|
-
|
|
393
|
-
id: number;
|
|
394
|
-
name?: string;
|
|
395
|
-
};
|
|
392
|
+
regionId: number;
|
|
396
393
|
}
|
|
397
394
|
export interface RewardScoreResponse {
|
|
398
395
|
rewardScore: number;
|
|
@@ -407,32 +404,6 @@ export interface RewardScoreResponse {
|
|
|
407
404
|
glwPriceUsd6: string;
|
|
408
405
|
regionInfo: {
|
|
409
406
|
regionId: number;
|
|
410
|
-
regionName: string;
|
|
411
|
-
existingFarmCount: number;
|
|
412
|
-
existingTotalDepositsUsd: string;
|
|
413
|
-
currencyBreakdown: {
|
|
414
|
-
currency: string;
|
|
415
|
-
protocolDepositSum: string;
|
|
416
|
-
carbonCreditProductionSum: string;
|
|
417
|
-
}[];
|
|
418
|
-
regionGctlStaked: string;
|
|
419
|
-
totalGctlStakedAllRegions: string;
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
export interface EstimateRewardScoreApiResponse {
|
|
423
|
-
rewardScore: number;
|
|
424
|
-
userWeeklyPdRewards: string;
|
|
425
|
-
userWeeklyPdRewardsUsd: string;
|
|
426
|
-
userWeeklyGlwRewards: string;
|
|
427
|
-
userWeeklyGlwValueUsd: string;
|
|
428
|
-
userEstimatedWeeklyCash: string;
|
|
429
|
-
userProtocolDeposit: string;
|
|
430
|
-
userGlowSplitPercent: string;
|
|
431
|
-
userDepositSplitPercent: string;
|
|
432
|
-
glwPriceUsd6: string;
|
|
433
|
-
regionInfo: {
|
|
434
|
-
regionId: number;
|
|
435
|
-
regionName: string;
|
|
436
407
|
existingFarmCount: number;
|
|
437
408
|
existingTotalDepositsUsd: string;
|
|
438
409
|
currencyBreakdown: {
|
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ import type {
|
|
|
5
5
|
SponsoredFarmsResponse,
|
|
6
6
|
EstimateRewardScoreParams,
|
|
7
7
|
RewardScoreResponse,
|
|
8
|
-
EstimateRewardScoreApiResponse,
|
|
9
8
|
EstimateRewardScoreErrorResponse,
|
|
10
9
|
} from "../types";
|
|
11
10
|
|
|
@@ -49,15 +48,16 @@ export function FarmsRouter(baseUrl: string) {
|
|
|
49
48
|
): Promise<RewardScoreResponse> => {
|
|
50
49
|
try {
|
|
51
50
|
// First try to get the success response
|
|
52
|
-
const data = await request<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
const data = await request<EstimateRewardScoreErrorResponse>(
|
|
52
|
+
"/farms/estimate-reward-score",
|
|
53
|
+
{
|
|
54
|
+
method: "POST",
|
|
55
|
+
headers: {
|
|
56
|
+
"Content-Type": "application/json",
|
|
57
|
+
},
|
|
58
|
+
body: JSON.stringify(params),
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
61
|
|
|
62
62
|
// Check if it's an error response
|
|
63
63
|
if ("error" in data) {
|
package/src/lib/types/index.ts
CHANGED
|
@@ -476,10 +476,7 @@ export interface EstimateRewardScoreParams {
|
|
|
476
476
|
protocolDepositAmount: string;
|
|
477
477
|
paymentCurrency: PaymentCurrency;
|
|
478
478
|
adjustedWeeklyCarbonCredits: number;
|
|
479
|
-
|
|
480
|
-
id: number;
|
|
481
|
-
name?: string;
|
|
482
|
-
};
|
|
479
|
+
regionId: number;
|
|
483
480
|
}
|
|
484
481
|
|
|
485
482
|
export interface RewardScoreResponse {
|
|
@@ -495,33 +492,6 @@ export interface RewardScoreResponse {
|
|
|
495
492
|
glwPriceUsd6: string;
|
|
496
493
|
regionInfo: {
|
|
497
494
|
regionId: number;
|
|
498
|
-
regionName: string;
|
|
499
|
-
existingFarmCount: number;
|
|
500
|
-
existingTotalDepositsUsd: string;
|
|
501
|
-
currencyBreakdown: {
|
|
502
|
-
currency: string;
|
|
503
|
-
protocolDepositSum: string;
|
|
504
|
-
carbonCreditProductionSum: string;
|
|
505
|
-
}[];
|
|
506
|
-
regionGctlStaked: string;
|
|
507
|
-
totalGctlStakedAllRegions: string;
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
export interface EstimateRewardScoreApiResponse {
|
|
512
|
-
rewardScore: number;
|
|
513
|
-
userWeeklyPdRewards: string;
|
|
514
|
-
userWeeklyPdRewardsUsd: string;
|
|
515
|
-
userWeeklyGlwRewards: string;
|
|
516
|
-
userWeeklyGlwValueUsd: string;
|
|
517
|
-
userEstimatedWeeklyCash: string;
|
|
518
|
-
userProtocolDeposit: string;
|
|
519
|
-
userGlowSplitPercent: string;
|
|
520
|
-
userDepositSplitPercent: string;
|
|
521
|
-
glwPriceUsd6: string;
|
|
522
|
-
regionInfo: {
|
|
523
|
-
regionId: number;
|
|
524
|
-
regionName: string;
|
|
525
495
|
existingFarmCount: number;
|
|
526
496
|
existingTotalDepositsUsd: string;
|
|
527
497
|
currencyBreakdown: {
|