-
Notifications
You must be signed in to change notification settings - Fork 2
feat: implement wallet_sendCalls
request handler
#526
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
base: aritra/5792_get_capabilities
Are you sure you want to change the base?
feat: implement wallet_sendCalls
request handler
#526
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
fcdfc53
to
3f44845
Compare
6c14029
to
0fbd8ca
Compare
Deploying happychain with
|
Latest commit: |
9ed7446
|
Status: | ✅ Deploy successful! |
Preview URL: | https://05e4905d.happychain.pages.dev |
Branch Preview URL: | https://aritra-5792-wallet-sendcalls.happychain.pages.dev |
0fbd8ca
to
e08e6e4
Compare
11ef2c8
to
7502930
Compare
e08e6e4
to
e2b48e4
Compare
e2b48e4
to
0cd1436
Compare
7502930
to
06f22f5
Compare
0cd1436
to
cf1850c
Compare
cf1850c
to
cb66b67
Compare
d1589ca
to
af3fd5b
Compare
some code reorg is needed 😅 |
} from "./common/Layout" | ||
import type { RequestConfirmationProps } from "./props" | ||
|
||
export function getFirstParam<T>(params: [T] | undefined): T | 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.
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.
should probs move this to wallet-common
?
@@ -65,6 +72,24 @@ export async function dispatchApprovedRequest(request: PopupMsgs[Msgs.PopupAppro | |||
return addWatchedAsset(user.address, request.payload.params) | |||
} | |||
|
|||
case "wallet_sendCalls": { |
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.
does this need to be in injected as well?
bun.lock
Outdated
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.
don't delete this
bun.lockb
Outdated
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.
delete this
demos/react/package.json
Outdated
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"sonner": "^1.7.2", | ||
"vaul": "^1.1.2", |
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.
i think these changes aren't used?
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.
removed it, was testing something w/ it :)
wallet_sendCalls
request handler
af3fd5b
to
dfe3f5a
Compare
cb66b67
to
a8d3bf0
Compare
type WalletSendCallsParams = WalletSendCallsParameters<BoopPaymasterCapability, Hex, Hex | bigint> | ||
|
||
// cf. | ||
export function checkedWalletSendCallsParams(params: WalletSendCallsParams | undefined): ValidWalletSendCallsRequest { |
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.
…for better flexibility
dfe3f5a
to
be88f94
Compare
a8d3bf0
to
9ed7446
Compare
Linked Issues
Description
Implemented support for the
wallet_sendCalls
method (EIP-5792) in the wallet iframe. This allows dApps to request transaction execution through a standardized interface.Key changes:
WalletSendCalls.tsx
to render transaction confirmation UIwallet_sendCalls
parametersboopPaymaster
)Toggle Checklist
Checklist
Basics
norswap/build-system-caching
).Reminder: PR review guidelines
Correctness
testnet, mainnet, standalone wallet, ...).
< INDICATE BROWSER, DEMO APP & OTHER ENV DETAILS USED FOR TESTING HERE >
< INDICATE TESTED SCENARIOS (USER INTERFACE INTERACTION, CODE FLOWS) HERE >
and have updated the code & comments accordingly.
Architecture & Documentation
(2) commenting these boundaries correctly, (3) adding inline comments for context when needed.
comments.
in a Markdown document.
pacakges/core
andpackages/react
), see here for more info.