@exodus/web3-ethereum-utils 3.22.1 → 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',
@@ -24,6 +25,10 @@ export const BLOWFISH_EVM_CHAINS = {
24
25
  network: 'optimism',
25
26
  chain: 'goerli',
26
27
  },
28
+ basemainnet: {
29
+ network: 'base',
30
+ chain: 'mainnet',
31
+ },
27
32
  };
28
33
  const convertTransactionToApiPayload = (transactions, origin) => ({
29
34
  txObjects: transactions.map((transaction) => ({
@@ -59,11 +64,22 @@ const handleExpectedBalanceChange = (expectedBalanceChange, simulationResult, {
59
64
  (kind === 'ERC1155_TRANSFER' && !asset.decimals);
60
65
  const symbol = asset.symbol;
61
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
+ }
62
77
  if (kind === 'ERC20_APPROVAL' ||
63
78
  kind === 'ERC721_APPROVAL_FOR_ALL' ||
64
79
  kind === 'ERC1155_APPROVAL_FOR_ALL' ||
65
80
  kind === 'ERC721_APPROVAL') {
66
81
  willApprove.push({
82
+ asset: asset_,
67
83
  spender: data.spender.address,
68
84
  unitName: symbol,
69
85
  balance: createCurrency({
@@ -80,6 +96,7 @@ const handleExpectedBalanceChange = (expectedBalanceChange, simulationResult, {
80
96
  return;
81
97
  }
82
98
  const balanceChange = {
99
+ asset: asset_,
83
100
  balance,
84
101
  };
85
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.22.1",
4
+ "version": "3.24.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "module": "lib/index.js",
@@ -22,17 +22,19 @@
22
22
  "repository": "https://github.com/ExodusMovement/exodus-web3/tree/master/libs/ethereum-utils",
23
23
  "license": "UNLICENSED",
24
24
  "scripts": {
25
- "clean": "rimraf lib",
26
- "build": "yarn clean && tsc"
25
+ "clean": "run -T rimraf lib",
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
- "@exodus/web3-utils": "^1.42.0",
35
- "@metamask/eth-sig-util": "^4.0.1"
35
+ "@exodus/web3-utils": "^1.43.0",
36
+ "@metamask/eth-sig-util": "^4.0.1",
37
+ "lodash": "^4.17.21"
36
38
  },
37
- "gitHead": "35ab04b61d447e2412d67cf7dd9ba9cff4c71d38"
39
+ "gitHead": "2907aa869e958d805f8652dec0b577fc84235632"
38
40
  }