@exodus/web3-ethereum-utils 3.18.0 → 3.18.1

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.
@@ -50,7 +50,7 @@ const createBalanceAmount = (amount, { decimals, symbol }) => {
50
50
  });
51
51
  return beforeAmount.sub(afterAmount);
52
52
  };
53
- const handleExpectedBalanceChange = (expectedBalanceChange, simulationResult) => {
53
+ const handleExpectedBalanceChange = (expectedBalanceChange, simulationResult, { network }) => {
54
54
  const { willApprove, willSend, willReceive } = simulationResult.balanceChanges;
55
55
  const { data, kind } = expectedBalanceChange.rawInfo;
56
56
  const { asset } = data;
@@ -84,8 +84,10 @@ const handleExpectedBalanceChange = (expectedBalanceChange, simulationResult) =>
84
84
  };
85
85
  if (isNftTransfer) {
86
86
  const tokenId = data.tokenId;
87
+ const compositeId = `${asset.address}/${tokenId}`;
87
88
  balanceChange.nft = {
88
- id: `ethereum:${asset.address}/${tokenId}`,
89
+ id: `${network}:${compositeId}`,
90
+ compositeId,
89
91
  title: asset.name,
90
92
  };
91
93
  }
@@ -147,6 +149,6 @@ export const simulateTransactions = async ({ transactions, apiEndpoint, origin,
147
149
  return;
148
150
  }
149
151
  userExpectedChanges.forEach((expectedChange) => {
150
- handleExpectedBalanceChange(expectedChange, simulationResult);
152
+ handleExpectedBalanceChange(expectedChange, simulationResult, { network });
151
153
  });
152
154
  };
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.18.0",
4
+ "version": "3.18.1",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "module": "lib/index.js",
@@ -26,13 +26,13 @@
26
26
  "build": "yarn clean && tsc"
27
27
  },
28
28
  "devDependencies": {
29
- "@exodus/web3-types": "^1.45.0"
29
+ "@exodus/web3-types": "^1.46.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "@exodus/ethereumjs-common": "^2.4.0-exodus.6",
33
33
  "@exodus/ethereumjs-tx": "^3.3.0-exodus.6",
34
- "@exodus/web3-utils": "^1.39.0",
34
+ "@exodus/web3-utils": "^1.40.0",
35
35
  "@metamask/eth-sig-util": "^4.0.1"
36
36
  },
37
- "gitHead": "f7bc0aaecb18b659a85b6229b49a491886f0b570"
37
+ "gitHead": "556ef966fd45fe2460c861602a1c1e781171cf34"
38
38
  }