@gearbox-protocol/sdk 14.8.0-next.4 → 14.8.0

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.
@@ -35,12 +35,13 @@ function getReleasedStrategiesListCore({
35
35
  (acc, s) => {
36
36
  const network = s.chainId !== void 0 ? allowedChains[s.chainId] : void 0;
37
37
  const isNetworkCorrect = !!network && network === s.network;
38
- const isHidden = !showHiddenStrategies && !!s.hideInProd;
38
+ const isHidden = !showHiddenStrategies && s.hideInProd;
39
39
  const showInMainApp = s.showInMainApp ?? true;
40
- const showCondition = !!curatorFilter || showInMainApp;
41
- if (isNetworkCorrect && !isHidden && showCondition) {
40
+ const showCondition = curatorFilter || showInMainApp;
41
+ if (isNetworkCorrect && !isHidden && source.hasToken(s.chainId, s.tokenOutAddress) && showCondition) {
42
42
  acc.push({
43
43
  ...s,
44
+ id: s.tokenOutAddress,
44
45
  network
45
46
  });
46
47
  }
@@ -12,12 +12,13 @@ function getReleasedStrategiesListCore({
12
12
  (acc, s) => {
13
13
  const network = s.chainId !== void 0 ? allowedChains[s.chainId] : void 0;
14
14
  const isNetworkCorrect = !!network && network === s.network;
15
- const isHidden = !showHiddenStrategies && !!s.hideInProd;
15
+ const isHidden = !showHiddenStrategies && s.hideInProd;
16
16
  const showInMainApp = s.showInMainApp ?? true;
17
- const showCondition = !!curatorFilter || showInMainApp;
18
- if (isNetworkCorrect && !isHidden && showCondition) {
17
+ const showCondition = curatorFilter || showInMainApp;
18
+ if (isNetworkCorrect && !isHidden && source.hasToken(s.chainId, s.tokenOutAddress) && showCondition) {
19
19
  acc.push({
20
20
  ...s,
21
+ id: s.tokenOutAddress,
21
22
  network
22
23
  });
23
24
  }
@@ -10,7 +10,7 @@ export interface NotValidatedStrategy extends Omit<StrategyConfigPayload, "addit
10
10
  additionalCollaterals?: ExtraCollaterals;
11
11
  }
12
12
  export interface Strategy extends Omit<NotValidatedStrategy, "network" | "id"> {
13
- id: string;
13
+ id: Address;
14
14
  network: NetworkType;
15
15
  }
16
16
  export type StrategyRecord = Record<number, Record<Strategy["id"], Strategy>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "14.8.0-next.4",
3
+ "version": "14.8.0",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",