@merkl/api 0.10.222 → 0.10.223

Sign up to get free protection for your applications and to get access to all the features.
@@ -2704,6 +2704,7 @@ declare const eden: {
2704
2704
  mainParameter?: string | undefined;
2705
2705
  rewardToken?: string | undefined;
2706
2706
  proof?: string | undefined;
2707
+ reloadChainId?: number | undefined;
2707
2708
  chainId: never;
2708
2709
  user: string;
2709
2710
  };
@@ -6150,6 +6151,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6150
6151
  mainParameter?: string | undefined;
6151
6152
  rewardToken?: string | undefined;
6152
6153
  proof?: string | undefined;
6154
+ reloadChainId?: number | undefined;
6153
6155
  chainId: never;
6154
6156
  user: string;
6155
6157
  };
@@ -8888,6 +8890,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8888
8890
  mainParameter?: string | undefined;
8889
8891
  rewardToken?: string | undefined;
8890
8892
  proof?: string | undefined;
8893
+ reloadChainId?: number | undefined;
8891
8894
  chainId: never;
8892
8895
  user: string;
8893
8896
  };
@@ -3411,6 +3411,7 @@ declare const app: Elysia<"", false, {
3411
3411
  mainParameter?: string | undefined;
3412
3412
  rewardToken?: string | undefined;
3413
3413
  proof?: string | undefined;
3414
+ reloadChainId?: number | undefined;
3414
3415
  chainId: never;
3415
3416
  user: string;
3416
3417
  };
@@ -736,6 +736,7 @@ export declare const v3: Elysia<"/v3", false, {
736
736
  mainParameter?: string | undefined;
737
737
  rewardToken?: string | undefined;
738
738
  proof?: string | undefined;
739
+ reloadChainId?: number | undefined;
739
740
  chainId: never;
740
741
  user: string;
741
742
  };
@@ -1,6 +1,7 @@
1
1
  import type Elysia from "elysia";
2
2
  export declare const query: import("@sinclair/typebox").TObject<{
3
3
  chainId: import("@sinclair/typebox").TUnion<import("elysia").TSchema[]>;
4
+ reloadChainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
4
5
  mainParameter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
5
6
  proof: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
6
7
  rewardToken: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -27,6 +28,7 @@ declare const _default: (app: Elysia) => Elysia<"", false, {
27
28
  mainParameter?: string | undefined;
28
29
  rewardToken?: string | undefined;
29
30
  proof?: string | undefined;
31
+ reloadChainId?: number | undefined;
30
32
  chainId: never;
31
33
  user: string;
32
34
  };
@@ -9,6 +9,7 @@ import { utils } from "ethers";
9
9
  import checkQueryChainIdValidity from "../../hooks/checkQueryChainIdValidity";
10
10
  export const query = t.Object({
11
11
  chainId: param.Chain.type,
12
+ reloadChainId: t.Optional(t.Number()),
12
13
  mainParameter: t.Optional(t.String()),
13
14
  proof: t.Optional(t.String()),
14
15
  rewardToken: t.Optional(t.String()),
@@ -44,7 +45,7 @@ export default (app) => app
44
45
  }
45
46
  }
46
47
  // @Warning: this is not taking into account the mainParameter filter
47
- const v4Res = await RewardService.getUserRewardsByChain(user, false, [chainId]);
48
+ const v4Res = await RewardService.getUserRewardsByChain(user, false, [chainId], query.reloadChainId ?? null);
48
49
  const v3Res = RewardConvertorService.convertV4toUserRewardV3(v4Res, proof);
49
50
  return v3Res;
50
51
  }, {