@exodus/web3-ethereum-utils 3.12.0 → 3.14.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.
@@ -12,5 +12,5 @@ declare type SimulateTransactionParams = Required<Pick<CreateSimulateTransaction
12
12
  headers?: Record<string, string>;
13
13
  assetName: string;
14
14
  };
15
- export declare const simulateTransactions: ({ transactions, apiEndpoint, origin, simulationResult, headers, assetName, }: SimulateTransactionParams) => Promise<void> | never;
15
+ export declare const simulateTransactions: ({ transactions, apiEndpoint, origin, simulationResult, headers, assetName, }: SimulateTransactionParams) => Promise<void>;
16
16
  export {};
@@ -83,7 +83,9 @@ const handleExpectedBalanceChange = (expectedBalanceChange, simulationResult) =>
83
83
  balance,
84
84
  };
85
85
  if (isNftTransfer) {
86
+ const tokenId = data.tokenId;
86
87
  balanceChange.nft = {
88
+ id: `ethereum:${asset.address}/${tokenId}`,
87
89
  title: asset.name,
88
90
  };
89
91
  }
@@ -121,6 +123,9 @@ export const simulateTransactions = async ({ transactions, apiEndpoint, origin,
121
123
  payload,
122
124
  headers,
123
125
  });
126
+ if (!response) {
127
+ return;
128
+ }
124
129
  const { expectedStateChanges = {}, error } = response.simulationResults.aggregated;
125
130
  if (error) {
126
131
  // ToDo: accept a logger dep and log the error
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.12.0",
4
+ "version": "3.14.0",
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.39.0"
29
+ "@exodus/web3-types": "^1.41.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.33.0",
34
+ "@exodus/web3-utils": "^1.35.0",
35
35
  "@metamask/eth-sig-util": "^4.0.1"
36
36
  },
37
- "gitHead": "74b6ea557aa30047cfc1bb7d91f07fb0d5548961"
37
+ "gitHead": "08f6532cdca62933d2088cfdebd70125978f9998"
38
38
  }