@exodus/web3-ethereum-utils 3.23.0 → 3.24.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.
@@ -3,6 +3,7 @@
3
3
  with the according balance changes.
4
4
  */
5
5
  import { createCurrency, makeSimulationAPICall } from '@exodus/web3-utils';
6
+ import { pick } from 'lodash';
6
7
  export const BLOWFISH_EVM_CHAINS = {
7
8
  ethereum: {
8
9
  network: 'ethereum',
@@ -63,11 +64,22 @@ const handleExpectedBalanceChange = (expectedBalanceChange, simulationResult, {
63
64
  (kind === 'ERC1155_TRANSFER' && !asset.decimals);
64
65
  const symbol = asset.symbol;
65
66
  const decimals = isNftTransfer ? 1 : asset.decimals;
67
+ const asset_ = pick(asset, [
68
+ 'address',
69
+ 'imageUrl',
70
+ 'name',
71
+ 'symbol',
72
+ 'verified',
73
+ ]);
74
+ if (isNftTransfer) {
75
+ asset_.imageUrl = data?.metadata?.rawImageUrl;
76
+ }
66
77
  if (kind === 'ERC20_APPROVAL' ||
67
78
  kind === 'ERC721_APPROVAL_FOR_ALL' ||
68
79
  kind === 'ERC1155_APPROVAL_FOR_ALL' ||
69
80
  kind === 'ERC721_APPROVAL') {
70
81
  willApprove.push({
82
+ asset: asset_,
71
83
  spender: data.spender.address,
72
84
  unitName: symbol,
73
85
  balance: createCurrency({
@@ -84,6 +96,7 @@ const handleExpectedBalanceChange = (expectedBalanceChange, simulationResult, {
84
96
  return;
85
97
  }
86
98
  const balanceChange = {
99
+ asset: asset_,
87
100
  balance,
88
101
  };
89
102
  if (isNftTransfer) {
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.23.0",
4
+ "version": "3.24.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "module": "lib/index.js",
@@ -26,13 +26,15 @@
26
26
  "build": "yarn clean && run -T tsc"
27
27
  },
28
28
  "devDependencies": {
29
- "@exodus/web3-types": "0.0.0"
29
+ "@exodus/web3-types": "0.0.0",
30
+ "@types/lodash": "^4"
30
31
  },
31
32
  "dependencies": {
32
33
  "@exodus/ethereumjs-common": "^2.4.0-exodus.6",
33
34
  "@exodus/ethereumjs-tx": "^3.3.0-exodus.6",
34
35
  "@exodus/web3-utils": "^1.43.0",
35
- "@metamask/eth-sig-util": "^4.0.1"
36
+ "@metamask/eth-sig-util": "^4.0.1",
37
+ "lodash": "^4.17.21"
36
38
  },
37
- "gitHead": "8ba379ef8cf8553458af3a6dc7d5a8d97951852f"
39
+ "gitHead": "2907aa869e958d805f8652dec0b577fc84235632"
38
40
  }