Skip to content

Commit

Permalink
chore: update versions (alpha) (#276)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Feb 7, 2025
1 parent 9604732 commit 1af318e
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 42 deletions.
2 changes: 2 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"website": "0.0.1"
},
"changesets": [
"beige-cups-poke",
"big-donuts-push",
"chilled-laws-kiss",
"chilled-pots-chew",
Expand All @@ -29,6 +30,7 @@
"nervous-horses-study",
"perfect-ravens-melt",
"pink-carrots-jam",
"rotten-mugs-fail",
"slimy-books-turn",
"wise-days-juggle"
]
Expand Down
10 changes: 10 additions & 0 deletions packages/walletkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @node-real/walletkit

## 2.8.0-alpha.10

### Minor Changes

- 47dd579: Refactor & add ConnectButton & ProfileModal

### Patch Changes

- cc36a2d: Update website

## 2.8.0-alpha.9

### Patch Changes
Expand Down
84 changes: 43 additions & 41 deletions packages/walletkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,61 +30,62 @@ npm i @node-real/walletkit@^2 wagmi@^2 viem@^2 @tanstack/react-query@^5
```tsx
import '@node-real/walletkit/styles.css';

import { trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets';
import { binanceWallet, trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import {
defaultWagmiConfig,
SwitchNetworkModal,
WalletKitButton,
WalletKitOptions,
ConnectModal,
WalletKitConfig,
WalletKitProvider,
ConnectButton,
SwitchNetworkModal,
ProfileModal,
ConnectModal,
} from '@node-real/walletkit';
import { WagmiProvider } from 'wagmi';
import { AppProps } from 'next/app';
import { chains } from './chains';
import { bsc, mainnet } from 'wagmi/chains';

const queryClient = new QueryClient();

const config = defaultWagmiConfig({
appName: '[Your app name]', // Your app name
chains,
connectors: [trustWallet(), metaMask(), walletConnect()],

// WalletConnect 2.0 requires a projectId which you can create quickly
// and easily for free over at WalletConnect Cloud https://cloud.walletconnect.com/sign-in
walletConnectProjectId: 'xxx',
});

const options: WalletKitOptions = {
initialChainId: 1,
const config: WalletKitConfig = {
options: {
closeModalOnEsc: false,
},
evmConfig: defaultEvmConfig({
autoConnect: true,
initialChainId: 1,

// WalletConnect 2.0 requires a projectId which you can create quickly
// and easily for free over at WalletConnect Cloud https://cloud.walletconnect.com/sign-in
walletConnectProjectId: 'xxx',

wallets: [binanceWallet(), metaMask(), trustWallet(), walletConnect()],
chains: [mainnet, bsc],
}),
};


export default function App({ Component, pageProps }: AppProps) {
return (
<WagmiProvider config={config} reconnectOnMount={true}>
<QueryClientProvider client={queryClient}>
<WalletKitProvider options={options} mode="light">
<Component {...pageProps} />

<WalletKitButton />
<ConnectModal />

{/*
Profile modal shows some basic information about the current account,
if you don't need this modal, you can remove it.
*/}
<ProfileModal />

{/* 👇 Here's the SwitchNetworkModal
If the user switches to a network that is not supported by our dApp,
this modal will be displayed to remind the user to switch to our supported networks.
*/}
<SwitchNetworkModal />
</WalletKitProvider>
</QueryClientProvider>
</WagmiProvider>
<QueryClientProvider client={queryClient}>
<WalletKitProvider config={config} debugMode={true} mode="auto">
<Component {...pageProps} />

<ConnectButton />
<ConnectModal />

{/*
Profile modal shows some basic information about the current account,
if you don't need this modal, you can remove it.
*/}
<ProfileModal />

{/* 👇 Here's the SwitchNetworkModal
If the user switches to a network that is not supported by our dApp,
this modal will be displayed to remind the user to switch to our supported networks.
*/}
<SwitchNetworkModal />
</WalletKitProvider>
</QueryClientProvider>
);
}
```
Expand All @@ -93,6 +94,7 @@ export default function App({ Component, pageProps }: AppProps) {

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


## License

See [LICENSE](./LICENSE) for more information.
2 changes: 1 addition & 1 deletion packages/walletkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@node-real/walletkit",
"version": "2.8.0-alpha.9",
"version": "2.8.0-alpha.10",
"author": "node-real",
"private": false,
"description": "WalletKit is a React component library for easily connecting a wallet to your dApp.",
Expand Down

0 comments on commit 1af318e

Please sign in to comment.