-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: forward custom RPC URLs to embedded wallet #4570
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
54a34d3
chore: add rpc url to secure site url
tomiir 4f99819
feat: add rpc url to connect, getUser, connectSocial, switchNetwork a…
tomiir 99954b8
chore: add changeset
tomiir 54d7b1b
chore: remove unused code. remove comments
tomiir 8cb43d3
Merge branch 'main' into feat/custom-rpc-url-ew
tomiir 05a131f
Merge branch 'main' of github.com:reown-com/appkit into feat/custom-r…
tomiir efe0199
Merge branch 'feat/custom-rpc-url-ew' of github.com:reown-com/appkit …
tomiir 0999d18
feat: add missing tests
tomiir ab06501
chore: amend tests
tomiir 16b64b2
chore: optional
tomiir 1ee9948
chore: add new page and remove custom code from wagmi page
tomiir 3b12cce
Merge branch 'main' into feat/custom-rpc-url-ew
tomiir 1b874a6
chore: amend test mock
tomiir 62fc571
Merge branch 'main' of github.com:reown-com/appkit into feat/custom-r…
tomiir 81b68e9
Merge branch 'feat/custom-rpc-url-ew' of github.com:reown-com/appkit …
tomiir 3ae648c
fix: issue with chain id parsing. Add test
tomiir 0434e98
chore: add missing schema
tomiir 187a122
chore: use aux method
tomiir 5d4e465
chore: improve ns handling
tomiir b8cb393
fix: amend SIWE nonce to 8 characters in default siwx
tomiir File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| '@reown/appkit-adapter-ethers5': patch | ||
| '@reown/appkit-adapter-ethers': patch | ||
| '@reown/appkit-adapter-solana': patch | ||
| '@reown/appkit-adapter-wagmi': patch | ||
| '@reown/appkit-utils': patch | ||
| '@reown/appkit-controllers': patch | ||
| '@reown/appkit': patch | ||
| '@reown/appkit-wallet': patch | ||
| '@reown/appkit-adapter-bitcoin': patch | ||
| '@reown/appkit-cdn': patch | ||
| '@reown/appkit-cli': patch | ||
| '@reown/appkit-codemod': patch | ||
| '@reown/appkit-common': patch | ||
| '@reown/appkit-core': patch | ||
| '@reown/appkit-experimental': patch | ||
| '@reown/appkit-pay': patch | ||
| '@reown/appkit-polyfills': patch | ||
| '@reown/appkit-scaffold-ui': patch | ||
| '@reown/appkit-siwe': patch | ||
| '@reown/appkit-siwx': patch | ||
| '@reown/appkit-testing': patch | ||
| '@reown/appkit-ui': patch | ||
| '@reown/appkit-wallet-button': patch | ||
| --- | ||
|
|
||
| Add forwarding of custom RPC urls to be used in embedded wallet requests |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| 'use client' | ||
|
|
||
| import { QueryClient, QueryClientProvider } from '@tanstack/react-query' | ||
| import { WagmiProvider } from 'wagmi' | ||
|
|
||
| import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' | ||
|
|
||
| import { AppKitButtons } from '@/src/components/AppKitButtons' | ||
| import { AppKitConnections } from '@/src/components/AppKitConnections' | ||
| import { AppKitInfo } from '@/src/components/AppKitInfo' | ||
| import { WagmiTests } from '@/src/components/Wagmi/WagmiTests' | ||
| import { AppKitProvider } from '@/src/context/AppKitContext' | ||
| import { ConstantsUtil } from '@/src/utils/ConstantsUtil' | ||
|
|
||
| const queryClient = new QueryClient() | ||
|
|
||
| const customRpcUrls = { | ||
| 'eip155:1': [{ url: 'https://ethereum-rpc.publicnode.com' }] | ||
| } | ||
|
|
||
| const wagmiAdapter = new WagmiAdapter({ | ||
| ssr: true, | ||
| networks: ConstantsUtil.EvmNetworks, | ||
| projectId: ConstantsUtil.ProjectId, | ||
| customRpcUrls | ||
| }) | ||
|
|
||
| const config = { | ||
| adapters: [wagmiAdapter], | ||
| networks: ConstantsUtil.EvmNetworks, | ||
| projectId: ConstantsUtil.ProjectId, | ||
| customWallets: ConstantsUtil.CustomWallets, | ||
| customRpcUrls | ||
| } | ||
| const wagmiConfig = wagmiAdapter.wagmiConfig | ||
|
|
||
| export default function Wagmi() { | ||
| return ( | ||
| <WagmiProvider config={wagmiConfig}> | ||
| <QueryClientProvider client={queryClient}> | ||
| <AppKitProvider config={config}> | ||
| <AppKitButtons /> | ||
| <AppKitConnections namespace="eip155" /> | ||
| <AppKitInfo /> | ||
| <WagmiTests config={wagmiConfig} /> | ||
| </AppKitProvider> | ||
| </QueryClientProvider> | ||
| </WagmiProvider> | ||
| ) | ||
| } |
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.