@exodus/web3-ethereum-utils 4.4.0 → 4.5.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.
|
@@ -163,6 +163,17 @@ export const simulateTransactions = async ({ transactions, apiEndpoint, origin,
|
|
|
163
163
|
errorMessage: error?.humanReadableError,
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
+
const { action } = response;
|
|
167
|
+
if (action === 'BLOCK') {
|
|
168
|
+
const warning = {
|
|
169
|
+
kind: 'MALICIOUS_ACTION',
|
|
170
|
+
severity: 'CRITICAL',
|
|
171
|
+
// We use a generic default message unless we find a known warning type below
|
|
172
|
+
// (TODO: add known warning types)
|
|
173
|
+
message: 'This dApp could be malicious. Do not proceed unless you are certain this is safe.',
|
|
174
|
+
};
|
|
175
|
+
simulationResult.warnings.push(warning);
|
|
176
|
+
}
|
|
166
177
|
const noExpectedStateChangesDetected = Object.keys(expectedStateChanges).length === 0;
|
|
167
178
|
// This is a self-send transaction, adding a zero "transfer" so that the UI can display it.
|
|
168
179
|
if (noExpectedStateChangesDetected) {
|
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": "4.
|
|
4
|
+
"version": "4.5.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"module": "lib/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"test": "run -T exodus-test --jest --esbuild"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@exodus/web3-types": "1.57.
|
|
37
|
+
"@exodus/web3-types": "1.57.2"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@exodus/basic-utils": "^3.0.1",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Aweb3-ethereum-utils"
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://github.com/ExodusMovement/assets/tree/master/web3/web3-ethereum-utils",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "a703c06af7e51ff5810dc4feb397ef61639059fa"
|
|
52
52
|
}
|