Skip to content

feat: EOA support for the Checkout component#1937

Closed
azf20 wants to merge 1 commit intocoinbase:mainfrom
azf20:checkout-for-eoas
Closed

feat: EOA support for the Checkout component#1937
azf20 wants to merge 1 commit intocoinbase:mainfrom
azf20:checkout-for-eoas

Conversation

@azf20
Copy link

@azf20 azf20 commented Feb 7, 2025

What changed? Why?

This introduces support for sequential approve / call actions as a fallback to the experimental wagmi writeContracts, to enable EOAs to use the component

Currently the component does not work for EOAs, as it relies on experimental wagmi multicall functionality:

  • If an EOA is connected via Coinbase wallet, it will fail trying to checkCapabilities
  • If an EOA is connected in another way (e.g. Metamask), the user will be prompted to connect a Coinbase wallet, rather than leveraging the existing connection

This is confusing and limits the usefulness of the component. By adding support for sequential transactions, this can be used for all account types.

There is a small optimisation to check the allowance before making the "approve" transaction, in case that can be skipped (e.g. if the approve was made already and then the purchase wasn't made for some reason, or if there is an infinite / higher approval).

Notes to reviewers

Currently this only adds the feature (to unblock EthGlobal hackathon progress), but can add tests / docs if there is appetite to merge this upstream.

How has it been tested?

  • Checked / linted / built
  • Tested with Metamask, Coinbase wallet (passkey) and Coinbase wallet (app, EOA)

@vercel
Copy link

vercel bot commented Feb 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ❌ Failed (Inspect) Feb 7, 2025 3:29pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 3:29pm

@vercel
Copy link

vercel bot commented Feb 7, 2025

@azf20 is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@0xAlec
Copy link
Contributor

0xAlec commented Apr 21, 2025

Only smart wallets are supported due to requiring atomicBatch capability to maintain the "Apple Pay"-like UX.

We can revisit this once EIP-7702 is implemented and we can enable EOAs to have the same UX as smart wallets.

@0xAlec 0xAlec closed this Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants