@exodus/web3-ethereum-utils 3.35.0 → 3.35.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.
@@ -43,8 +43,7 @@ const handleExpectedBalanceChange = (expectedBalanceChange, simulationResult, {
43
43
  const isNftTransferApproval = kind === 'ERC721_APPROVAL' ||
44
44
  (kind === 'ERC721_APPROVAL_FOR_ALL' && !asset.decimals) ||
45
45
  (kind === 'ERC1155_APPROVAL_FOR_ALL' && !asset.decimals);
46
- const symbol = asset.symbol;
47
- const decimals = isNftTransfer || isNftTransferApproval ? 1 : asset.decimals;
46
+ const decimals = isNftTransfer || isNftTransferApproval ? 0 : asset.decimals;
48
47
  const asset_ = pick(asset, [
49
48
  'address',
50
49
  'imageUrl',
@@ -52,6 +51,9 @@ const handleExpectedBalanceChange = (expectedBalanceChange, simulationResult, {
52
51
  'symbol',
53
52
  'verified',
54
53
  ]);
54
+ // According to the Blowfish docs, `symbol` and `name` can be null as they are not required by the standard.
55
+ // Using `NFT` as a fallback ensures a user sees a meaningful UI in that case.
56
+ const symbol = asset.symbol || asset.name || 'NFT';
55
57
  if (isNftTransfer || isNftTransferApproval) {
56
58
  asset_.imageUrl = data?.metadata?.rawImageUrl;
57
59
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exodus/web3-ethereum-utils",
3
3
  "description": "Web3 Ethereum utils.",
4
- "version": "3.35.0",
4
+ "version": "3.35.2",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "module": "lib/index.js",
@@ -27,7 +27,7 @@
27
27
  "build": "yarn clean && run -T tsc"
28
28
  },
29
29
  "devDependencies": {
30
- "@exodus/web3-types": "1.49.0"
30
+ "@exodus/web3-types": "1.50.0"
31
31
  },
32
32
  "dependencies": {
33
33
  "@exodus/basic-utils": "^2.5.1",
@@ -36,5 +36,5 @@
36
36
  "@exodus/web3-utils": "^1.47.1",
37
37
  "@metamask/eth-sig-util": "^4.0.1"
38
38
  },
39
- "gitHead": "97a9adffba6edc4a782f45ebbf2fc5f6c188dc4b"
39
+ "gitHead": "594c6cee934c74a993aca62f9faea02e89a378da"
40
40
  }