metamask-extension
metamask-extension copied to clipboard
Fixed eth_getTransactionCount pending to return hex
Explanation
eth_getTransactionCount
had an issue where only for "pending"
it was returning our internal nonce which is fine, but it was returning it as a number not as hex as described in the spec
Fixes #5845
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
Builds ready [dc110cf]
Page Load Metrics (2109 ± 104 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 84 | 207 | 128 | 33 | 16 |
domContentLoaded | 1709 | 2545 | 2060 | 240 | 115 | ||
load | 1798 | 2545 | 2109 | 217 | 104 | ||
domInteractive | 1709 | 2545 | 2060 | 240 | 115 |
An annoying question: might existing dapps rely on it being a number?
@danjm it only returns a number for "pending", not for "latest". which is odd behaviour. technically this would break dapps but im sure dapps are broken today because of it returning a number in certain cases.
this is an example of https://www.hyrumslaw.com/
With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody.
@shanejonas Yes, that makes sense. Perhaps we should give some sort of deprecation warning though? Even just two weeks or something like that.
@danjm can we use the "Whats new?" feature for this?
We like can't use the What's New feature because that wouldn't go out ahead of time.
I think we could add a page on docs.metamask.io that shows API changes for versions of MetaMask, similar to this page: https://docs.metamask.io/guide/provider-migration.html
That makes sense @shanejonas
I think we just need to establish a standard communication process for when we make changes that could break dapps. We probably should start an active e-mail list and make it known that it should be monitored if you want to stay on top of breaking changes.
So in addition to adding notices to the page you linked, we should have some way of pushing updates to that page out to developers
@danjm @shanejonas did the notice ever go out and can we move forward with this PR?
Converted to draft until proper resources can be dedicated to dapp outreach and review.