@toruslabs/ethereum-controllers 6.2.0 → 6.2.2

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.
@@ -201,7 +201,7 @@ class NftsController extends baseControllers.BaseController {
201
201
  return undefined;
202
202
  }
203
203
  }));
204
- const nonZeroTokens = promiseSettledResult.filter(x => x.status === "fulfilled").map(x => x.value);
204
+ const nonZeroTokens = promiseSettledResult.filter(x => x.status === "fulfilled" && x.value).map(x => x.value);
205
205
  this.update({
206
206
  nfts: {
207
207
  [userAddress]: deepmerge(this.userNfts, nonZeroTokens)
@@ -159,7 +159,8 @@ class TransactionController extends TransactionStateManager.TransactionStateMana
159
159
  maxFeePerGas: txMeta.transaction.maxFeePerGas,
160
160
  maxPriorityFeePerGas: txMeta.transaction.maxPriorityFeePerGas,
161
161
  nonce: Number.parseInt(txMeta.transaction.nonce, 16),
162
- to: txMeta.transaction.to
162
+ to: txMeta.transaction.to,
163
+ value: txMeta.transaction.value
163
164
  };
164
165
  const fromAddress = txMeta.transaction.from;
165
166
  const tx = ethers.Transaction.from(txParams);
@@ -48,8 +48,8 @@ const SUPPORTED_NETWORKS = {
48
48
  displayName: "Polygon",
49
49
  logo: "polygon.svg",
50
50
  rpcTarget: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`,
51
- ticker: "MATIC",
52
- tickerName: "Matic Network Token"
51
+ ticker: "POL",
52
+ tickerName: "Polygon Ecosystem Token"
53
53
  },
54
54
  [BSC_MAINNET_CHAIN_ID]: {
55
55
  chainNamespace: baseControllers.CHAIN_NAMESPACES.EIP155,
@@ -148,8 +148,8 @@ const SUPPORTED_NETWORKS = {
148
148
  displayName: "Polygon Amoy",
149
149
  logo: "polygon.svg",
150
150
  rpcTarget: `https://polygon-amoy.infura.io/v3/${INFURA_KEY}`,
151
- ticker: "MATIC",
152
- tickerName: "Matic Network Token",
151
+ ticker: "POL",
152
+ tickerName: "Polygon Ecosystem Token",
153
153
  isTestnet: true
154
154
  },
155
155
  [BSC_TESTNET_CHAIN_ID]: {
@@ -275,7 +275,7 @@ const COINGECKO_SUPPORTED_CURRENCIES = new Set(["btc", "eth", "ltc", "bch", "bnb
275
275
  const COINGECKO_PLATFORMS_CHAIN_CODE_MAP = {
276
276
  [POLYGON_CHAIN_ID]: {
277
277
  platform: "polygon-pos",
278
- currency: "matic"
278
+ currency: "pol"
279
279
  },
280
280
  [BSC_MAINNET_CHAIN_ID]: {
281
281
  platform: "binance-smart-chain",
@@ -199,7 +199,7 @@ class NftsController extends BaseController {
199
199
  return undefined;
200
200
  }
201
201
  }));
202
- const nonZeroTokens = promiseSettledResult.filter(x => x.status === "fulfilled").map(x => x.value);
202
+ const nonZeroTokens = promiseSettledResult.filter(x => x.status === "fulfilled" && x.value).map(x => x.value);
203
203
  this.update({
204
204
  nfts: {
205
205
  [userAddress]: deepmerge(this.userNfts, nonZeroTokens)
@@ -157,7 +157,8 @@ class TransactionController extends TransactionStateManager {
157
157
  maxFeePerGas: txMeta.transaction.maxFeePerGas,
158
158
  maxPriorityFeePerGas: txMeta.transaction.maxPriorityFeePerGas,
159
159
  nonce: Number.parseInt(txMeta.transaction.nonce, 16),
160
- to: txMeta.transaction.to
160
+ to: txMeta.transaction.to,
161
+ value: txMeta.transaction.value
161
162
  };
162
163
  const fromAddress = txMeta.transaction.from;
163
164
  const tx = Transaction.from(txParams);
@@ -46,8 +46,8 @@ const SUPPORTED_NETWORKS = {
46
46
  displayName: "Polygon",
47
47
  logo: "polygon.svg",
48
48
  rpcTarget: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`,
49
- ticker: "MATIC",
50
- tickerName: "Matic Network Token"
49
+ ticker: "POL",
50
+ tickerName: "Polygon Ecosystem Token"
51
51
  },
52
52
  [BSC_MAINNET_CHAIN_ID]: {
53
53
  chainNamespace: CHAIN_NAMESPACES.EIP155,
@@ -146,8 +146,8 @@ const SUPPORTED_NETWORKS = {
146
146
  displayName: "Polygon Amoy",
147
147
  logo: "polygon.svg",
148
148
  rpcTarget: `https://polygon-amoy.infura.io/v3/${INFURA_KEY}`,
149
- ticker: "MATIC",
150
- tickerName: "Matic Network Token",
149
+ ticker: "POL",
150
+ tickerName: "Polygon Ecosystem Token",
151
151
  isTestnet: true
152
152
  },
153
153
  [BSC_TESTNET_CHAIN_ID]: {
@@ -273,7 +273,7 @@ const COINGECKO_SUPPORTED_CURRENCIES = new Set(["btc", "eth", "ltc", "bch", "bnb
273
273
  const COINGECKO_PLATFORMS_CHAIN_CODE_MAP = {
274
274
  [POLYGON_CHAIN_ID]: {
275
275
  platform: "polygon-pos",
276
- currency: "matic"
276
+ currency: "pol"
277
277
  },
278
278
  [BSC_MAINNET_CHAIN_ID]: {
279
279
  platform: "binance-smart-chain",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toruslabs/ethereum-controllers",
3
- "version": "6.2.0",
3
+ "version": "6.2.2",
4
4
  "homepage": "https://github.com/torusresearch/controllers#readme",
5
5
  "license": "ISC",
6
6
  "sideEffects": false,
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@ethereumjs/util": "^9.1.0",
24
- "@toruslabs/base-controllers": "^6.2.0",
24
+ "@toruslabs/base-controllers": "^6.2.2",
25
25
  "@toruslabs/http-helpers": "^7.0.0",
26
26
  "@web3auth/auth": "^9.3.3",
27
27
  "async-mutex": "^0.5.0",
@@ -61,7 +61,7 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "14437406216427df89ef1ee3329d473efff35e12",
64
+ "gitHead": "a6981fd60a84757fc1874cb67cb4df4b75d0cc34",
65
65
  "devDependencies": {
66
66
  "@nomicfoundation/hardhat-chai-matchers": "^2.0.7",
67
67
  "@nomicfoundation/hardhat-ethers": "^3.0.8",