@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.
@@ -389,10 +389,7 @@ export interface EstimateRewardScoreParams {
389
389
  protocolDepositAmount: string;
390
390
  paymentCurrency: PaymentCurrency;
391
391
  adjustedWeeklyCarbonCredits: number;
392
- zone: {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glowlabs-org/utils",
3
- "version": "0.2.97",
3
+ "version": "0.2.98",
4
4
  "description": "A library containing all typechain types and addresses relating to the glow guarded launch",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -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
- EstimateRewardScoreApiResponse | EstimateRewardScoreErrorResponse
54
- >("/farms/estimate-reward-score", {
55
- method: "POST",
56
- headers: {
57
- "Content-Type": "application/json",
58
- },
59
- body: JSON.stringify(params),
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) {
@@ -476,10 +476,7 @@ export interface EstimateRewardScoreParams {
476
476
  protocolDepositAmount: string;
477
477
  paymentCurrency: PaymentCurrency;
478
478
  adjustedWeeklyCarbonCredits: number;
479
- zone: {
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: {