-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: send statusChange event to sync wagmi status with account c…
…ontroller (#3329) Co-authored-by: tomiir <rocchitomas@gmail.com>
- Loading branch information
1 parent
ba72eca
commit 9f48a1d
Showing
16 changed files
with
513 additions
and
94 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,11 +1,24 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", | ||
"changelog": ["@changesets/changelog-github", { "repo": "reown-com/appkit" }], | ||
"changelog": ["@changesets/changelog-github", | ||
{ "repo": "reown-com/appkit" }], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": ["@examples/*", "@apps/gallery-new", "@apps/laboratory", "@apps/laboratory-new", "@reown/appkit-new", "@reown/appkit-scaffold-ui-new", "@reown/appkit-ui-new", "@reown/appkit-adapter-bitcoin"] | ||
"ignore": [ | ||
"@examples/*", | ||
"@apps/demo", | ||
"@apps/gallery", | ||
"@apps/gallery-new", | ||
"@apps/laboratory", | ||
"@apps/laboratory-new", | ||
"@reown/appkit-new", | ||
"@reown/appkit-scaffold-ui-new", | ||
"@reown/appkit-ui-new", | ||
"@reown/appkit-adapter-bitcoin", | ||
"@reown/appkit-adapter-polkadot" | ||
] | ||
} |
This file contains 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,20 @@ | ||
--- | ||
'@reown/appkit-adapter-wagmi': patch | ||
'@reown/appkit': patch | ||
'@reown/appkit-common': patch | ||
'@reown/appkit-core': patch | ||
'@reown/appkit-adapter-ethers': patch | ||
'@reown/appkit-adapter-ethers5': patch | ||
'@reown/appkit-adapter-solana': patch | ||
'@reown/appkit-utils': patch | ||
'@reown/appkit-cdn': patch | ||
'@reown/appkit-experimental': patch | ||
'@reown/appkit-polyfills': patch | ||
'@reown/appkit-scaffold-ui': patch | ||
'@reown/appkit-siwe': patch | ||
'@reown/appkit-siwx': patch | ||
'@reown/appkit-ui': patch | ||
'@reown/appkit-wallet': patch | ||
--- | ||
|
||
Sync wagmi status with account controller status |
This file contains 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,41 @@ | ||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query' | ||
import { WagmiProvider } from 'wagmi' | ||
import { AppKitButtons } from '../../components/AppKitButtons' | ||
import { WagmiTests } from '../../components/Wagmi/WagmiTests' | ||
import { WagmiModalInfo } from '../../components/Wagmi/WagmiModalInfo' | ||
import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' | ||
import { createAppKit } from '@reown/appkit/react' | ||
import { ConstantsUtil } from '../../utils/ConstantsUtil' | ||
import { ThemeStore } from '../../utils/StoreUtil' | ||
|
||
const queryClient = new QueryClient() | ||
|
||
const wagmiAdapter = new WagmiAdapter({ | ||
networks: ConstantsUtil.EvmNetworks, | ||
projectId: ConstantsUtil.ProjectId | ||
}) | ||
|
||
const modal = createAppKit({ | ||
adapters: [wagmiAdapter], | ||
networks: ConstantsUtil.EvmNetworks, | ||
projectId: ConstantsUtil.ProjectId, | ||
features: { | ||
analytics: true | ||
}, | ||
customWallets: ConstantsUtil.CustomWallets | ||
}) | ||
|
||
const config = wagmiAdapter.wagmiConfig | ||
ThemeStore.setModal(modal) | ||
|
||
export default function Wagmi() { | ||
return ( | ||
<WagmiProvider config={config}> | ||
<QueryClientProvider client={queryClient}> | ||
<AppKitButtons /> | ||
<WagmiModalInfo /> | ||
<WagmiTests config={config} /> | ||
</QueryClientProvider> | ||
</WagmiProvider> | ||
) | ||
} |
This file contains 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 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 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 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 |
---|---|---|
@@ -1 +1 @@ | ||
export const PACKAGE_VERSION = '1.5.1' | ||
export const PACKAGE_VERSION = '1.5.2' |
This file contains 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 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.