@cityofzion/bs-ethereum 2.12.5 → 2.12.6

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.
@@ -47,26 +47,22 @@ class MoralisEDSEthereum extends blockchain_service_1.CryptoCompareEDS {
47
47
  throw new Error('Exchange is not supported on this network');
48
48
  const client = MoralisBDSEthereum_1.MoralisBDSEthereum.getClient(__classPrivateFieldGet(this, _MoralisEDSEthereum_network, "f"));
49
49
  const nativeToken = BSEthereumHelper_1.BSEthereumHelper.getNativeAsset(__classPrivateFieldGet(this, _MoralisEDSEthereum_network, "f"));
50
+ const tokensBody = [];
50
51
  let wrappedNativeToken;
51
52
  if (params.tokens.some(token => token.symbol === nativeToken.symbol)) {
52
53
  try {
53
54
  wrappedNativeToken = yield __classPrivateFieldGet(this, _MoralisEDSEthereum_instances, "m", _MoralisEDSEthereum_getWrappedNativeToken).call(this);
55
+ if (wrappedNativeToken) {
56
+ tokensBody.push({ token_address: wrappedNativeToken.hash });
57
+ }
54
58
  }
55
59
  catch (_a) {
56
60
  /* empty */
57
61
  }
58
62
  }
59
- const tokensBody = [];
60
- params.tokens.map(token => {
63
+ params.tokens.forEach(token => {
61
64
  if (token.symbol !== nativeToken.symbol) {
62
- tokensBody.push({
63
- token_address: token.hash,
64
- });
65
- }
66
- if (wrappedNativeToken) {
67
- tokensBody.push({
68
- token_address: wrappedNativeToken.hash,
69
- });
65
+ tokensBody.push({ token_address: token.hash });
70
66
  }
71
67
  });
72
68
  if (tokensBody.length === 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-ethereum",
3
- "version": "2.12.5",
3
+ "version": "2.12.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": "https://github.com/CityOfZion/blockchain-services",
@@ -32,8 +32,8 @@
32
32
  "dotenv": "16.3.1",
33
33
  "eslint": "^8.48.0",
34
34
  "jest": "29.6.2",
35
- "ts-jest": "29.1.1",
36
- "ts-node": "10.9.1",
35
+ "ts-jest": "~29.4.0",
36
+ "ts-node": "~10.9.2",
37
37
  "typescript": "4.9.5"
38
38
  },
39
39
  "scripts": {