@gearbox-protocol/sdk 3.0.0-next.47 → 3.0.0-next.49

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.
@@ -37,11 +37,11 @@ class AssetUtils {
37
37
  static memoWrap = (unwrappedAddress, wrappedAddress, prices, tokensList) => function wrap(assets) {
38
38
  const assetsRecord = AssetUtils.constructAssetRecord(assets);
39
39
  const unwrapped = assetsRecord[unwrappedAddress];
40
- const { balance: unwrappedAmount = 0n } = unwrapped || {};
41
40
  const wrapped = assetsRecord[wrappedAddress];
42
41
  const { balance: wrappedAmount = 0n } = wrapped || {};
43
42
  // if there unwrapped token
44
43
  if (unwrapped) {
44
+ const { balance: unwrappedAmount = 0n } = unwrapped || {};
45
45
  const unwrappedToken = tokensList[unwrappedAddress];
46
46
  const unwrappedPrice = prices[unwrappedAddress] || 0n;
47
47
  const wrappedToken = tokensList[wrappedAddress];
@@ -61,7 +61,7 @@ class AssetUtils {
61
61
  return [Object.values(assetsRecord), unwrappedInWrapped, wrappedAmount];
62
62
  }
63
63
  // else no actions needed
64
- return [Object.values(assetsRecord), unwrappedAmount, wrappedAmount];
64
+ return [Object.values(assetsRecord), 0n, wrappedAmount];
65
65
  };
66
66
  /**
67
67
  * Sums the the second assets list into the first assets list
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-next.47",
3
+ "version": "3.0.0-next.49",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "test": "npx mocha -r ts-node/register -r dotenv/config src/**/*.spec.ts"
31
31
  },
32
32
  "dependencies": {
33
- "@gearbox-protocol/sdk-gov": "^1.11.5",
33
+ "@gearbox-protocol/sdk-gov": "^1.14.0",
34
34
  "axios": "^1.2.6",
35
35
  "decimal.js-light": "^2.5.1",
36
36
  "deep-eql": "^4.1.0",