Skip to content

Commit 1af318e

Browse files
chore: update versions (alpha) (#276)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 9604732 commit 1af318e

File tree

4 files changed

+56
-42
lines changed

4 files changed

+56
-42
lines changed

.changeset/pre.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"website": "0.0.1"
99
},
1010
"changesets": [
11+
"beige-cups-poke",
1112
"big-donuts-push",
1213
"chilled-laws-kiss",
1314
"chilled-pots-chew",
@@ -29,6 +30,7 @@
2930
"nervous-horses-study",
3031
"perfect-ravens-melt",
3132
"pink-carrots-jam",
33+
"rotten-mugs-fail",
3234
"slimy-books-turn",
3335
"wise-days-juggle"
3436
]

packages/walletkit/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# @node-real/walletkit
22

3+
## 2.8.0-alpha.10
4+
5+
### Minor Changes
6+
7+
- 47dd579: Refactor & add ConnectButton & ProfileModal
8+
9+
### Patch Changes
10+
11+
- cc36a2d: Update website
12+
313
## 2.8.0-alpha.9
414

515
### Patch Changes

packages/walletkit/README.md

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -30,61 +30,62 @@ npm i @node-real/walletkit@^2 wagmi@^2 viem@^2 @tanstack/react-query@^5
3030
```tsx
3131
import '@node-real/walletkit/styles.css';
3232

33-
import { trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets';
33+
import { binanceWallet, trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets';
3434
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
3535
import {
36-
defaultWagmiConfig,
37-
SwitchNetworkModal,
38-
WalletKitButton,
39-
WalletKitOptions,
36+
ConnectModal,
37+
WalletKitConfig,
4038
WalletKitProvider,
39+
ConnectButton,
40+
SwitchNetworkModal,
4141
ProfileModal,
42-
ConnectModal,
4342
} from '@node-real/walletkit';
4443
import { WagmiProvider } from 'wagmi';
4544
import { AppProps } from 'next/app';
46-
import { chains } from './chains';
45+
import { bsc, mainnet } from 'wagmi/chains';
4746

4847
const queryClient = new QueryClient();
4948

50-
const config = defaultWagmiConfig({
51-
appName: '[Your app name]', // Your app name
52-
chains,
53-
connectors: [trustWallet(), metaMask(), walletConnect()],
54-
55-
// WalletConnect 2.0 requires a projectId which you can create quickly
56-
// and easily for free over at WalletConnect Cloud https://cloud.walletconnect.com/sign-in
57-
walletConnectProjectId: 'xxx',
58-
});
59-
60-
const options: WalletKitOptions = {
61-
initialChainId: 1,
49+
const config: WalletKitConfig = {
50+
options: {
51+
closeModalOnEsc: false,
52+
},
53+
evmConfig: defaultEvmConfig({
54+
autoConnect: true,
55+
initialChainId: 1,
56+
57+
// WalletConnect 2.0 requires a projectId which you can create quickly
58+
// and easily for free over at WalletConnect Cloud https://cloud.walletconnect.com/sign-in
59+
walletConnectProjectId: 'xxx',
60+
61+
wallets: [binanceWallet(), metaMask(), trustWallet(), walletConnect()],
62+
chains: [mainnet, bsc],
63+
}),
6264
};
6365

66+
6467
export default function App({ Component, pageProps }: AppProps) {
6568
return (
66-
<WagmiProvider config={config} reconnectOnMount={true}>
67-
<QueryClientProvider client={queryClient}>
68-
<WalletKitProvider options={options} mode="light">
69-
<Component {...pageProps} />
70-
71-
<WalletKitButton />
72-
<ConnectModal />
73-
74-
{/*
75-
Profile modal shows some basic information about the current account,
76-
if you don't need this modal, you can remove it.
77-
*/}
78-
<ProfileModal />
79-
80-
{/* 👇 Here's the SwitchNetworkModal
81-
If the user switches to a network that is not supported by our dApp,
82-
this modal will be displayed to remind the user to switch to our supported networks.
83-
*/}
84-
<SwitchNetworkModal />
85-
</WalletKitProvider>
86-
</QueryClientProvider>
87-
</WagmiProvider>
69+
<QueryClientProvider client={queryClient}>
70+
<WalletKitProvider config={config} debugMode={true} mode="auto">
71+
<Component {...pageProps} />
72+
73+
<ConnectButton />
74+
<ConnectModal />
75+
76+
{/*
77+
Profile modal shows some basic information about the current account,
78+
if you don't need this modal, you can remove it.
79+
*/}
80+
<ProfileModal />
81+
82+
{/* 👇 Here's the SwitchNetworkModal
83+
If the user switches to a network that is not supported by our dApp,
84+
this modal will be displayed to remind the user to switch to our supported networks.
85+
*/}
86+
<SwitchNetworkModal />
87+
</WalletKitProvider>
88+
</QueryClientProvider>
8889
);
8990
}
9091
```
@@ -93,6 +94,7 @@ export default function App({ Component, pageProps }: AppProps) {
9394

9495
Please follow our [WalletKit Contribution Guide](./CONTRIBUTING.md).
9596

97+
9698
## License
9799

98100
See [LICENSE](./LICENSE) for more information.

packages/walletkit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@node-real/walletkit",
3-
"version": "2.8.0-alpha.9",
3+
"version": "2.8.0-alpha.10",
44
"author": "node-real",
55
"private": false,
66
"description": "WalletKit is a React component library for easily connecting a wallet to your dApp.",

0 commit comments

Comments
 (0)