-
Notifications
You must be signed in to change notification settings - Fork 5.2k
feat: support updated EIP-5792 specification #30967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
7244dda
to
cdc0dec
Compare
Update unit tests.
Remove capabilities.
Add constants. Add version validation.
298b977
to
6aa2f5b
Compare
Builds ready [6940043]
Page Load Metrics (3290 ± 1452 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
// Temporary fix for E2E tests that rely on `gasLimit` being ignored | ||
// and resulting `eth_estimateGas` delaying confirmation. | ||
if (process.env.IN_TEST && transactionParams.gasLimit?.length) { | ||
transactionParams.gasLimit = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgrading @metamask/transaction-controller
past 48.2.0
includes a fix that supports both gas
and gasLimit
in params.
Many of the E2E tests use the #sendButton
to create legacy transactions via the test dApp, which includes gasLimit
.
As this was previously ignored, the transaction controller would automatically estimate the gas limit via eth_estimateGas
which would slightly delay the display of the confirmation.
Some of these tests were reliant on that timing, meaning they now break since the confirmations display quicker as no estimate is performed since the gasLimit
is provided.
This is the quickest and least invasive fix as it doesn't require new releases, doesn't require refactoring multiple E2E tests, and doesn't require a patch which would be very large since the test dApp code is minimised to a single line.
Description
Support updated EIP-5792 specification.
See #363 for specification changes.
Specifically:
GetCallsStatus
hook.wallet_sendCalls
.version
not supported inwallet_sendCalls
.batchId
.wallet_getCapabilities
.status
code fromwallet_getCallsStatus
.@metamask/transaction-controller
to49.0.0
.@metamask/eth-json-rpc-middleware
to16.0.0
.Related issues
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist