feat: add sendCalls execution logic and request normalization helpers#2235
Merged
DanielSinclair merged 2 commits intomasterfrom Mar 20, 2026
Merged
Conversation
Contributor
Author
This was referenced Mar 16, 2026
bde96e2 to
fc91cde
Compare
b357450 to
f4d3ec4
Compare
DanielSinclair
approved these changes
Mar 18, 2026
Collaborator
DanielSinclair
left a comment
There was a problem hiding this comment.
Small tweak recommendations
src/entries/popup/pages/messages/SendTransaction/normalizeRequest.ts
Outdated
Show resolved
Hide resolved
5209c0d to
bd35a1f
Compare
f4d3ec4 to
0362aa5
Compare
bd35a1f to
d5cab8b
Compare
0362aa5 to
1b7bafe
Compare
d5cab8b to
f69cac9
Compare
1b7bafe to
7648d8d
Compare
7648d8d to
d437e46
Compare
f69cac9 to
95008ea
Compare
d437e46 to
b03d66d
Compare
51c5d42 to
d92ac43
Compare
b03d66d to
68f2cad
Compare
d92ac43 to
7d70b1a
Compare
68f2cad to
7adfc78
Compare
7d70b1a to
1ade1de
Compare
1b1c638 to
de6d0d0
Compare
8307322 to
6a782f5
Compare
de6d0d0 to
9a21993
Compare
6a782f5 to
801b74e
Compare
9a21993 to
9f73419
Compare
801b74e to
a1a841f
Compare
a1a841f to
717ec49
Compare
9f73419 to
1055c40
Compare
fa47824 to
eb4f795
Compare
3c115f1 to
1ca8e4e
Compare
eb4f795 to
61971a1
Compare
1ca8e4e to
1cb0e8f
Compare
61971a1 to
ddacaad
Compare
1cb0e8f to
1bdfee1
Compare
d4e3f6e to
f01d42c
Compare
ddacaad to
77f88d3
Compare
77f88d3 to
9ed0fb5
Compare
f01d42c to
9e15e66
Compare
9ed0fb5 to
c6402cf
Compare
Collaborator
Merge activity
|
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.

Add sendCalls execution logic and request normalization helpers
Pure library code for executing EIP-5792 batches and normalising provider requests into a shape the existing
SendTransactionUI can work with. No UI changes, no wiring — just functions.What's included
executeSendCallsBatch– TakesSendCallsParams+ sender address, executes via the delegation SDK'sexecuteBatchedTransaction, records the resulting tx withaddNewTransaction, and returns{ success, txHashes }or{ success: false, error }.normalizeRequest.ts– Helpers that let the approval screen handle botheth_sendTransactionandwallet_sendCallsuniformly:isSendCallsParams/isWalletSendCallsRequest– type guardsgetTransactionRequestFromRequest– extracts the first call as aTransactionRequestfor single-tx displaygetTransactionRequestsFromRequest– returns all calls asTransactionRequest[]for simulation and gas estimationgetChainIdForRequest– prefers the batch's explicitchainIdover the session defaultDesign choices & review focus
executeSendCallsBatchrequires delegation support. If the wallet or chain doesn't support it, it returns a clean error rather than falling back to sequential sends. This is intentional: EIP-5792atomicmeans all-or-nothing.useGasStore.getState().selectedGasto get EIP-1559 params. This works because the approval popup has already populated the gas store by the time execution runs.PR-Codex overview
This PR enhances the
sendCallsfunctionality by introducing a new batch execution method, improving type definitions, and adding validation forwallet_sendCallsrequests. It also includes error handling for delegation support and gas parameters.Detailed summary
SendCallsParamsandRequestCapabilityexports insrc/core/sendCalls/types.ts.executeSendCallsBatchinsrc/core/sendCalls/executeSendCallsBatch.tsfor batch execution.src/entries/popup/pages/messages/SendTransaction/normalizeRequest.tsto supportwallet_sendCalls.