Repository navigation
Add try/catch for assetsContract.getBalanceOf - #328
Merged
Merged
Conversation
rickycodes
force-pushed
the
bugfix/token-balance-shows-0
branch
from
January 19, 2021 23:19
2f0a413 to
1296469
Compare
3 tasks done
andrepimenta
requested changes
Jan 20, 2021
rickycodes
force-pushed
the
bugfix/token-balance-shows-0
branch
from
January 21, 2021 04:56
af7ad92 to
75ad094
Compare
Gudahtt
previously approved these changes
Jan 21, 2021
Mrtenz
pushed a commit
that referenced
this pull request
Oct 16, 2025
Mrtenz
pushed a commit
that referenced
this pull request
Oct 16, 2025
* Request validation should not throw if verifyingContract is not defined in typed signature (#328) (#330) * 14.0.1 (#331) * [14.x] fix: support ethermint's EIP712 implementation (#333) * setting cosmos as allowed string for verifyingContract field * fixed and linter * readability * Update condition to match main branch * Remove duplicate copy of test --------- Co-authored-by: Jyoti Puri <jyotipuri@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Version 14.0.2 (#339) * Version 14.0.2 * Fix typo Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com> --------- Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com> --------- Co-authored-by: Jyoti Puri <jyotipuri@gmail.com> Co-authored-by: Michael Tsitrin <114929630+mtsitrin@users.noreply.github.com> Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>
amitabh94
pushed a commit
to amitabh94/core
that referenced
this pull request
Jun 16, 2026
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
Replaces MetaMask#324, which GitHub auto-closed as merged during a stack reorder when its head briefly became an ancestor of its base. The changes never reached `main`; this carries the same two commits. Mirrors [MetaMask#9976](MetaMask#9976), the bottom of core's foundational stack. | | Before | After | | --- | --- | --- | | `engines.node` | `^18.18 \|\| ^20.14 \|\| >=22` | `^22.14.0 \|\| ^24` | | `@types/node` | `~18.18.14` | `^22.13.14` | | CI matrix | 18, 20, 22 | 22, 24 | `constraints.pro` is updated so `yarn constraints` enforces the new range. Core makes the `@types/node` bump in this same PR rather than with its TypeScript change, since the types track the supported runtime. ## Position in the stack This now sits **below** the ESM conversion (MetaMask#323), so everything up to and including this PR is still a hybrid CJS/ESM build: ``` main → … → MetaMask#322 → this → MetaMask#323 (ESM only) → MetaMask#325 (TypeScript) ``` That matters for testing. A preview build from here still resolves through `main: ./dist/index.cjs` with the `require` condition intact, so it can be consumed by `metamask-extension` as-is. Everything below the ESM cut can therefore be verified against a real downstream consumer before the breaking change lands. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Semver-breaking runtime requirement may block consumers still on Node 18 or 20; in-repo changes are mostly policy, CI, and test cleanup with limited logic impact. > > **Overview** > **Breaking:** supported Node is now `^22.14.0 || ^24` instead of 18/20/22. That is enforced in `package.json`, `constraints.pro`, and documented under Unreleased in `CHANGELOG.md`. > > CI **prepare**, **test**, and **compatibility-test** jobs now run on Node **22.x** and **24.x** only (18 and 20 dropped from the matrix). Dev typings move from `@types/node` ~18 to **^22.13.14**, with matching `yarn.lock` updates. > > Test and lint tooling align with the new floor: ESLint comments for `n/no-unsupported-features/node-builtins` reflect that global `crypto` is expected on 22+, and `hashing.test.ts` drops the Node 18 `webcrypto` polyfill/`beforeEach` setup—tests assume `globalThis.crypto.subtle` exists. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ba81eca2d4fa1d9a00faa1bd7e975d1b5d02fc8d. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
Top of stack MetaMask#331, on MetaMask#325. Mirrors [MetaMask#10019](MetaMask#10019), the last of core's foundational chain. | | Before | After | | --- | --- | --- | | `target` | `ES2020` | `ES2022` | | `lib` | `["ES2020", "DOM"]` | `["ES2022", "DOM"]` | Correctly last in the order: raising the emit target is only defensible once the Node floor guarantees the runtime supports it, which MetaMask#328 established. ## It is not cosmetic `wrapError` sets `cause` behind two `@ts-ignore` comments, with this note in the source: > Error causes are not supported by our current tsc target (ES2020, we need ES2022 to make this work) `Error.cause` is ES2022, so both suppressions are now obsolete and are removed. The types are genuine rather than ignored. The evidence came from enabling test type checking: with `lib: ES2020` a `tsc` pass over the tests reports **11 errors**, nearly all `Property 'cause' does not exist`. With `lib: ES2022` it reports **zero**. That is why the type checking PR stacks on top of this one rather than below it. ## Verification Build, tests, tsd, eslint and lint all pass. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Breaking for consumers on older runtimes or TS configs that assumed ES2020 output; error utilities are widely used but the change is configuration and type hygiene rather than new logic. > > **Overview** > **BREAKING:** Raises the TypeScript **`target`** and **`lib`** from **ES2020** to **ES2022**, so published output expects a modern runtime or bundler that can consume ES2022. The unreleased changelog documents this alongside the existing Node/ESM breaking changes. > > In **`wrapError`**, the **`Error(message, { cause })`** path no longer needs **`@ts-ignore`** or the comment about ES2020 lacking **`Error.cause`** types—ES2022 **`lib`** makes **`cause`** a first-class typed option. > > No runtime behavior change in **`wrapError`** beyond what was already implemented; this is primarily a compile/emit floor and type-checking cleanup that unblocks stricter test **`tsc`** (e.g. **`cause`** on errors) in follow-up work. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6242b3e584a89dd8a4adf7a3c06c8439ab6ede4b. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this allows for tokens to have a
balanceErrorproperty... surprisingly similar to: https://github.com/MetaMask/eth-token-tracker/pull/53/files#diff-da4ef0bd8d62fc58923ab92dc5a94b4fdaeaa2a36242311727356d7e3f1d44d0R79re: #2128