-
-
Notifications
You must be signed in to change notification settings - Fork 15
Comparing changes
Open a pull request
base repository: MetaMask/utils
base: v5.0.2
head repository: MetaMask/utils
compare: v7.1.0
- 19 commits
- 47 files changed
- 15 contributors
Commits on Apr 26, 2023
-
Standardise repo per module template as of April 2023 (#102)
* Standardise repo per module template as of April 2023 * Fix test script * Fix test workflow * Add further standardisation
Configuration menu - View commit details
-
Copy full SHA for d4a9d2e - Browse repository at this point
Copy the full SHA d4a9d2eView commit details
Commits on May 30, 2023
-
First part of a solution for fixing JSON validation security issue (#103
) * Add changes as part of a solution for fixing JSON validation security issue * Remove unused fixtures * Refactor solution according to review comments * Add generic types * Refactor code (1) * Refactor code (2 - update function name) * Refactor code (3 - update test) * Fix docstring * Add Json type extension for getSafeJson
Configuration menu - View commit details
-
Copy full SHA for 68ef1a9 - Browse repository at this point
Copy the full SHA 68ef1a9View commit details
Commits on May 31, 2023
-
* 5.0.3 * Update CHANGELOG.md * Update CHANGELOG.md and change to major version --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: david0xd <david@timechaser.org>
Configuration menu - View commit details
-
Copy full SHA for 719854b - Browse repository at this point
Copy the full SHA 719854bView commit details
Commits on Jun 14, 2023
-
Strip
__proto__andconstructorJSON properties ingetSafeJson(#……105) Strip __proto__ and constructor JSON properties
Configuration menu - View commit details
-
Copy full SHA for 2148af4 - Browse repository at this point
Copy the full SHA 2148af4View commit details -
* 6.0.1 * Update CHANGELOG --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b59adde - Browse repository at this point
Copy the full SHA b59addeView commit details
Commits on Jun 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e263d07 - Browse repository at this point
Copy the full SHA e263d07View commit details -
* 6.1.0 * docs: add change category --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Michele Esposito <michele.esposito@consensys.net>
Configuration menu - View commit details
-
Copy full SHA for 1daaa37 - Browse repository at this point
Copy the full SHA 1daaa37View commit details
Commits on Jun 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 47b757d - Browse repository at this point
Copy the full SHA 47b757dView commit details
Commits on Jul 11, 2023
-
Add address related utils (#112)
* feat: add isValidHexAddress function * fix: accept only prefixed addresses * fix: remove case insensitive flag * test: add test case for 0X * feat: validate checksum addresses * feat: break out address checksum encoding to erc55EncodeAddress function (#113) * feat: break out address checksum encoding to erc55EncodeAddress function * deps: ethereum-cryptography@2.0.0->2.1.0; dedupe @noble/hashes * Update jsdoc Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * refactor: rename erc55EncodeAddress function * test: add test cases for getChecksumAddress --------- Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> Co-authored-by: Michele Esposito <michele@esposito.codes> * docs: edit isValidHexAddress jsdoc description * Update src/hex.ts Co-authored-by: Mark Stacey <markjstacey@gmail.com> * fix: add validation assertions --------- Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f1024ca - Browse repository at this point
Copy the full SHA f1024caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 68384c6 - Browse repository at this point
Copy the full SHA 68384c6View commit details -
Standardise repo per module template as of July 2023 (#115)
* Standardise repo per module template as of July 2023 * Fix some package-specific configs * Remove pull request template * Add pull request template again * Formatting
Configuration menu - View commit details
-
Copy full SHA for ab071ea - Browse repository at this point
Copy the full SHA ab071eaView commit details
Commits on Jul 13, 2023
-
Add getKnownPropertyNames (#111)
This function has been copied from various projects, where it is common to transform an enum into another data structure. For instance: ``` enum InfuraNetworkType { mainnet = 'mainnet', goerli = 'goerli', sepolia = 'sepolia', } const infuraNetworkClientConfigurations = Object.keys(InfuraNetworkType).map((network) => { const networkClientId = buildInfuraNetworkClientId(network); const networkClientConfiguration = { type: NetworkClientType.Infura, network, infuraProjectId: this.#infuraProjectId, }; return [networkClientId, networkClientConfiguration]; }); ``` As the above example, one could use `Object.keys()` or even `Object.getOwnPropertyNames()` to obtain said properties. A problem occurs, however, if the type of the properties of the resulting object needs to match the type of the properties in the enum, that means the variable inside the loop needs to be of that type, too. Both `Object.keys()` and `Object.getOwnPropertyNames()` are intentionally generic: they returns the property names of an object, but neither can make guarantees about the contents of that object, so the type of the property names is merely `string[]`. While this is technically accurate, we don't have to be so cautious in these situations, because we own the object in question and therefore know exactly which properties it has. This commit adds a `getKnownPropertyNames` function which is like `Object.getOwnPropertyNames()` except that the resulting array of property names will be typed using the types of the properties of the given object. In the above example that would mean that `network` would have a type of `InfuraNetworkType` and not `string`. Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>Configuration menu - View commit details
-
Copy full SHA for a1e5d90 - Browse repository at this point
Copy the full SHA a1e5d90View commit details
Commits on Jul 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 614b27c - Browse repository at this point
Copy the full SHA 614b27cView commit details
Commits on Jul 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 942bcd8 - Browse repository at this point
Copy the full SHA 942bcd8View commit details
Commits on Jul 24, 2023
-
BREAKING: Synchronise package with module template to fix ESM build (#…
…124) * Synchronise package with module template to fix ESM build * Dedupe dependencies
Configuration menu - View commit details
-
Copy full SHA for d94d13c - Browse repository at this point
Copy the full SHA d94d13cView commit details
Commits on Jul 25, 2023
-
Bump semver to ensure signed provenance, CVE fix (#123)
Co-authored-by: Craig Scheets <craig.scheets@consensys.io>
Configuration menu - View commit details
-
Copy full SHA for a244fa9 - Browse repository at this point
Copy the full SHA a244fa9View commit details -
* 7.0.0 * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
Configuration menu - View commit details
-
Copy full SHA for e5bc219 - Browse repository at this point
Copy the full SHA e5bc219View commit details
Commits on Aug 1, 2023
-
* add caip chain id * add parsing * Update parseCaipChainIdString behavior * lint * drop string suffix * Switch to @metamask/snap-utils caip types * lint * Separate regex const. Add CaipAccountAddressStruct * Add CaipAccountAddress specs * tighten types * remove unused types. cleanup specs. add fixtures * last bit
Configuration menu - View commit details
-
Copy full SHA for 2653a1a - Browse repository at this point
Copy the full SHA 2653a1aView commit details -
* 7.1.0 * update changelog * Update CHANGELOG.md Co-authored-by: Shane <jonas.shane@gmail.com> --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Jiexi Luan <jiexiluan@gmail.com> Co-authored-by: Shane <jonas.shane@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4cffdd4 - Browse repository at this point
Copy the full SHA 4cffdd4View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v5.0.2...v7.1.0