forked from thirdweb-dev/js
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Ecosystem PortalStalebugSomething isn't workingSomething isn't workingdashboarddependenciesPull requests that update a dependency filePull requests that update a dependency filedocumentationImprovements or additions to documentationImprovements or additions to documentationduplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or requestgithub_actionsPull requests that update GitHub Actions codePull requests that update GitHub Actions codegood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededinvalidThis doesn't seem rightThis doesn't seem rightjavascriptPull requests that update Javascript codePull requests that update Javascript codepackagesplaygroundportalquestionFurther information is requestedFurther information is requestedsdk
Description
Reviewer's Guide
Implements "Last Used" surfacing across the Connect UI and social auth flows, adds Base Account SDK wallet integration, upgrades x402 payment protocol handling to support version 2 with header-based signatures, adds EIP-5792 raw call status support and fallbacks for zkSync gas estimation, and wires corresponding docs, examples, tests, and changelog/version bumps.
Class diagram for Base Account SDK wallet and EIP-5792 extensions
classDiagram
class Wallet {
<<interface>>
+string id
+Account getAccount()
+Chain getChain()
+Promise~Account~ connect(options)
+Promise~Account~ autoConnect(options)
+Promise void disconnect()
+Promise void switchChain(chain)
+subscribe(event, listener)
}
class Account {
<<interface>>
+string address
+Promise sendTransaction(options)
+Promise~string~ signMessage(message)
+Promise~string~ signTypedData(typedData)
+Promise sendCalls(options)
+Promise~GetCallsStatusResponse~ getCallsStatus(options)
+Promise~GetCallsStatusRawResponse~ getCallsStatusRaw(options)
+Promise~WalletCapabilitiesResult~ getCapabilities(options)
}
class BaseAccountWalletCreationOptions {
+AppMetadata appMetadata
+Chain[] chains
}
class BaseAccountSDKWalletConnectionOptions {
+ThirdwebClient client
+Chain chain
}
class BaseAccountWallet {
<<Wallet "org.base.account">>
+string id
+BaseAccountWalletCreationOptions getConfig()
+Promise~Account~ connect(options)
+Promise~Account~ autoConnect(options)
+Promise void disconnect()
+Promise void switchChain(chain)
+Account getAccount()
+Chain getChain()
}
class ProviderInterface {
<<from @base-org/account>>
+Promise~unknown~ request(request)
+on(event, listener)
+off(event, listener)
+Promise void disconnect()
}
class GetCallsStatusRawResponse {
+string id
+string chainId
+boolean atomic
+int status
+Receipt[] receipts
+string version
}
class CoinbaseAccount {
<<EIP-1193 wallet>>
+Promise~GetCallsStatusRawResponse~ getCallsStatusRaw(options)
}
class InjectedAccount {
<<EIP-1193 wallet>>
+Promise~GetCallsStatusRawResponse~ getCallsStatusRaw(options)
}
class SmartAccount {
<<Smart wallet>>
+Promise~GetCallsStatusRawResponse~ getCallsStatusRaw(options)
}
class Minimal7702Account {
<<EIP-7702 account>>
+Promise~GetCallsStatusRawResponse~ getCallsStatusRaw(options)
}
class EnclaveWalletAccount {
<<In-app enclave>>
+Promise~GetCallsStatusRawResponse~ getCallsStatusRaw(options)
}
class ToEip1193Provider {
+EIP1193Provider toProvider(options)
}
Wallet <|.. BaseAccountWallet
Account <.. BaseAccountWallet : uses
ProviderInterface <.. BaseAccountWallet : providerFactory
GetCallsStatusRawResponse <.. Account
Account <|.. CoinbaseAccount
Account <|.. InjectedAccount
Account <|.. SmartAccount
Account <|.. Minimal7702Account
Account <|.. EnclaveWalletAccount
ToEip1193Provider --> Account : calls getCallsStatusRaw
Flow diagram for Last Used wallet and social auth persistence
flowchart TD
subgraph Storage
S1[localStorage
LAST_USED_WALLET_ID]
S2[localStorage
LAST_AUTH_PROVIDER]
end
subgraph ConnectModalOpen
O1[WalletSelector] --> O2[getLastUsedWalletId]
O2 --> S1
O1 --> O3[sortWallets]
O3 -->|prioritize installed| O4
O3 -->|then last used id| O5
O5 --> WalletList
WalletList -->|render| W1[WalletEntryButton]
W1 -->|if wallet.id === lastUsedId| W2[badge = Last used]
O1 --> C1[Connect a wallet button]
C1 -->|prop lastUsedBadge
when lastUsedId is non inApp non ecosystem| C2[Show LastUsedBadge]
end
subgraph SocialAuthOptions
SA1[ConnectWalletSocialOptions]
SA1 --> SA2[getLastUsedWalletId]
SA1 --> SA3[getLastUsedSocialAuth]
SA2 --> S1
SA3 --> S2
SA1 --> SA4[_authOptions]
SA4 -->|if wallet.id == lastUsedId
and lastUsedSocialAuth set| SA5[Sort auth options
to put last used first]
SA5 --> SA6[Render social buttons/InputSelectionUI]
SA6 -->|if wallet.id and method match last used| SA7[Show LastUsedBadge]
end
subgraph OnSuccessfulConnect
C10[ConnectionManager.connect]
C10 --> C11[Set LAST_ACTIVE_EOA_ID]
C10 --> C12[Set LAST_USED_WALLET_ID]
C11 --> S1
C12 --> S1
SocialLoginSuccess --> C13[setLastAuthProvider]
C13 --> S2
end
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Add Base Account SDK wallet integration and typings, wired through createWallet and exports. |
|
packages/thirdweb/src/wallets/constants.tspackages/thirdweb/src/wallets/wallet-types.tspackages/thirdweb/src/wallets/create-wallet.tspackages/thirdweb/src/exports/wallets.tspackages/thirdweb/package.jsonpackages/thirdweb/src/wallets/base-account/base-account-web.tspackages/thirdweb/src/wallets/base-account/base-account-wallet.tspackages/thirdweb/src/wallets/__generated__/wallet/org.base.account/index.tspackages/thirdweb/src/wallets/__generated__/wallet/org.base.account/image.tspackages/thirdweb/scripts/wallets/extra-wallet-icons/base.svg |
| Surface and persist "Last used" wallet/auth method across Connect UI and social login, including badges and layout tweaks. |
|
packages/thirdweb/src/wallets/manager/index.tspackages/thirdweb/src/react/web/ui/ConnectWallet/Modal/storage.tspackages/thirdweb/src/react/web/utils/sortWallets.tspackages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/WalletTypeRowButton.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/WalletEntryButton.tsxpackages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsxpackages/thirdweb/src/react/web/wallets/in-app/InputSelectionUI.tsxpackages/thirdweb/src/react/web/wallets/in-app/InputSelectionUI.test.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.tsxpackages/thirdweb/src/react/web/ui/components/badge.tsxpackages/thirdweb/src/stories/ConnectButton/others.stories.tsxpackages/thirdweb/src/stories/ConnectButton/themes.stories.tsx |
| Add redirect-based in-app profile linking flow and autoConnect handling for OAuth linking redirects. |
|
link) and ensure query params are cleaned from location after parsing. |
| Upgrade x402 payment protocol support to v2 with header-based signatures while maintaining v1 compatibility across types, encode/decode, facilitator, verify/settle helpers, and fetchWithPayment. |
|
packages/thirdweb/src/x402/types.tspackages/thirdweb/src/x402/headers.tspackages/thirdweb/src/x402/encode.tspackages/thirdweb/src/x402/common.tspackages/thirdweb/src/x402/facilitator.tspackages/thirdweb/src/x402/verify-payment.tspackages/thirdweb/src/x402/settle-payment.tspackages/thirdweb/src/x402/fetchWithPayment.tspackages/thirdweb/src/x402/schemas.tspackages/thirdweb/src/x402/fetchWithPayment.test.tsapps/playground-web/src/app/api/paywall/route.tsapps/portal/src/app/x402/page.mdxapps/portal/src/app/x402/server/page.mdxapps/portal/src/app/x402/facilitator/page.mdxpackages/nexus/src/verify-payment.tspackages/nexus/src/settle-payment.ts |
| Enhance EIP-5792 support by exposing raw call status, propagating it through accounts/providers, and adapting the EIP-1193 adapter. |
|
packages/thirdweb/src/wallets/interfaces/wallet.tspackages/thirdweb/src/wallets/in-app/core/eip5792/in-app-wallet-calls.tspackages/thirdweb/src/wallets/in-app/core/eip7702/minimal-account.tspackages/thirdweb/src/wallets/smart/index.tspackages/thirdweb/src/wallets/in-app/core/wallet/enclave-wallet.tspackages/thirdweb/src/wallets/coinbase/coinbase-web.tspackages/thirdweb/src/wallets/injected/index.tspackages/thirdweb/src/adapters/eip1193/to-eip1193.tsapps/wagmi-demo/src/App.tsx |
| Improve zkSync gas estimation by handling chains that no longer expose zks_estimateFee. |
|
packages/thirdweb/src/transaction/actions/zksync/send-eip712-transaction.tspackages/thirdweb/src/transaction/actions/zksync/send-eip712-transaction.test.ts |
| Docs, examples, and versioning updates to reflect new features and dependencies. |
|
packages/thirdweb/CHANGELOG.mdpackages/thirdweb/package.jsonpackages/nebula/CHANGELOG.mdpackages/nebula/package.jsonapps/wagmi-demo/CHANGELOG.mdapps/wagmi-demo/package.jsonpackages/wagmi-adapter/CHANGELOG.mdpackages/wagmi-adapter/package.jsonpackages/thirdweb/src/stories/ConnectButton/others.stories.tsxpackages/thirdweb/src/stories/ConnectButton/themes.stories.tsx |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with@sourcery-ai issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull
request title to generate a title at any time. You can also comment
@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment@sourcery-ai summaryon the pull request to
(re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull
request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request
summary, the reviewer's guide, and others. - Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Originally posted by @sourcery-ai[bot] in #601 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Ecosystem PortalStalebugSomething isn't workingSomething isn't workingdashboarddependenciesPull requests that update a dependency filePull requests that update a dependency filedocumentationImprovements or additions to documentationImprovements or additions to documentationduplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or requestgithub_actionsPull requests that update GitHub Actions codePull requests that update GitHub Actions codegood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededinvalidThis doesn't seem rightThis doesn't seem rightjavascriptPull requests that update Javascript codePull requests that update Javascript codepackagesplaygroundportalquestionFurther information is requestedFurther information is requestedsdk
Projects
Status
Done
Status
Done