@exodus/ethereum-api 8.9.0 → 8.9.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.
- package/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/src/error-wrapper.js +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.9.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.9.0...@exodus/ethereum-api@8.9.1) (2024-07-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @exodus/ethereum-api
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [8.9.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.8.0...@exodus/ethereum-api@8.9.0) (2024-07-03)
|
|
7
15
|
|
|
8
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-api",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.1",
|
|
4
4
|
"description": "Ethereum Api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"type": "git",
|
|
67
67
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "d52d315260d32e7a2fce15e32e7393813a02bc90"
|
|
70
70
|
}
|
package/src/error-wrapper.js
CHANGED
|
@@ -10,7 +10,7 @@ export const reasons = {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const MAX_HINT_LENGTH = 100
|
|
13
|
-
// TODO: move this to be
|
|
13
|
+
// TODO: move this to be a generic error for all assets
|
|
14
14
|
export class EthLikeError extends Error {
|
|
15
15
|
#hintStack
|
|
16
16
|
|
|
@@ -18,7 +18,6 @@ export class EthLikeError extends Error {
|
|
|
18
18
|
* Creates an instance of EthLikeError.
|
|
19
19
|
*
|
|
20
20
|
* @param {string} message - Standard error message.
|
|
21
|
-
* @param {string} tag - Tag associated with the error.
|
|
22
21
|
* @param {string} reason - A constant indicating the generic failure. Must not contain any sensitive information such as private keys, transaction IDs, or wallet addresses.
|
|
23
22
|
* @param {string} hint - A hint to help the user understand the error. Must not contain any sensitive information such as private keys, transaction IDs, or wallet addresses.
|
|
24
23
|
*/
|
|
@@ -47,8 +46,10 @@ export class EthLikeError extends Error {
|
|
|
47
46
|
|
|
48
47
|
// Define regex patterns for sensitive information
|
|
49
48
|
const sensitivePatterns = [
|
|
50
|
-
/(?:0x)?[\dA-Fa-f]{
|
|
51
|
-
/(?:
|
|
49
|
+
/(?:0x)?[\dA-Fa-f]{20,}/g, // Pattern for hex values of 20 or more characters
|
|
50
|
+
/(?:[A-Za-z]{3,20}\s+){11}[A-Za-z]{3,20}/g, // Pattern for 12-word phrases
|
|
51
|
+
/[1-9A-HJ-NP-Za-km-z]{50,}/g, // Pattern for base58 strings of 50 or more characters
|
|
52
|
+
/(?:[\d+/A-Za-z]{4}){3,}(?:[\d+/A-Za-z]{2}==|[\d+/A-Za-z]{3}=|[\d+/A-Za-z]{4})/g, // Pattern for base64 strings of 12 or more characters
|
|
52
53
|
]
|
|
53
54
|
|
|
54
55
|
let filteredHint = hint
|