Skip to content

Commit

Permalink
fix: merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
magiziz committed Jan 22, 2024
2 parents eba1b87 + 0f62e35 commit ca31675
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 65 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
"react-dom": "^18.2.0",
"recursive-readdir-files": "^2.3.1",
"typescript": "^5.0.4",
"viem": "^2.0.6",
"viem": "^2.4.1",
"vitest": "^0.33.0",
"wagmi": "^2.2.0"
"wagmi": "^2.3.1"
},
"packageManager": "[email protected]",
"pnpm": {
Expand Down
4 changes: 2 additions & 2 deletions packages/create-rainbowkit/generated-test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"next": "^14.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "^2.0.6",
"wagmi": "^2.2.0"
"viem": "^2.4.1",
"wagmi": "^2.3.1"
},
"devDependencies": {
"@types/node": "^18.19.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rainbowkit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rainbow-me/create-rainbowkit",
"description": "Scaffold a new RainbowKit project",
"version": "0.3.0-beta.1",
"version": "0.3.0-beta.2",
"files": [
"dist",
"templates"
Expand Down
4 changes: 2 additions & 2 deletions packages/create-rainbowkit/templates/next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"next": "^14.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "^2.0.6",
"wagmi": "^2.2.0"
"viem": "^2.4.1",
"wagmi": "^2.3.1"
},
"devDependencies": {
"@types/node": "^18.19.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"siwe": "^2.1.4",
"viem": "^2.0.6",
"wagmi": "^2.2.0"
"viem": "^2.4.1",
"wagmi": "^2.3.1"
},
"scripts": {
"dev": "next dev",
Expand Down
6 changes: 3 additions & 3 deletions packages/rainbow-button/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rainbow-me/rainbow-button",
"description": "Rainbow connector button",
"version": "0.2.0-beta.1",
"version": "0.2.0-beta.2",
"files": [
"dist",
"styles.css"
Expand Down Expand Up @@ -39,8 +39,8 @@
"peerDependencies": {
"react": ">=17",
"react-dom": ">=17",
"viem": "2.x.x",
"wagmi": "2.x.x"
"viem": "2.x",
"wagmi": "2.x"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/rainbowkit-siwe-next-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rainbow-me/rainbowkit-siwe-next-auth",
"version": "0.4.0-beta.1",
"version": "0.4.0-beta.2",
"description": "RainbowKit authentication adapter for Sign-In with Ethereum and NextAuth.js",
"files": [
"dist"
Expand Down
6 changes: 3 additions & 3 deletions packages/rainbowkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rainbow-me/rainbowkit",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"description": "The best way to connect a wallet",
"files": [
"dist",
Expand Down Expand Up @@ -44,8 +44,8 @@
"peerDependencies": {
"react": ">=17",
"react-dom": ">=17",
"viem": "2.x.x",
"wagmi": "2.x.x"
"viem": "2.x",
"wagmi": "2.x"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,21 @@ export function RainbowKitAuthenticationProvider<Message = unknown>({
// Ensure to turn off the "change" event listener for cleanup.
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
useEffect(() => {
if (connector && status === 'authenticated') {
// Wagmi renders emitter's partially on page load. We wanna make sure
// the event emitters gets updated before proceeding
if (
typeof connector?.emitter?.on === 'function' &&
status === 'authenticated'
) {
// Attach the event listener when status is 'authenticated'
connector.emitter?.on?.('change', handleChangedAccount);
connector.emitter.on('change', handleChangedAccount);

// Cleanup function to remove the event listener
return () => {
connector.emitter?.off?.('change', handleChangedAccount);
connector.emitter.off('change', handleChangedAccount);
};
}
}, [connector, status]);
}, [connector?.emitter, status]);

return (
<AuthenticationContext.Provider
Expand Down
85 changes: 43 additions & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions site/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# site

## 0.0.86

### Patch Changes

- ae66859: Add `projectId` to `bifrostWallet` in the docs for custom wallet list

## 0.0.85

### Patch Changes
Expand Down
1 change: 1 addition & 0 deletions site/data/en-US/docs/custom-wallet-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ bitgetWallet(options: {
```tsx
import { bifrostWallet } from '@rainbow-me/rainbowkit/wallets';
bifrostWallet(options: {
projectId: string;
chains: Chain[];
});
```
Expand Down
6 changes: 3 additions & 3 deletions site/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "site",
"version": "0.0.85",
"version": "0.0.86",
"description": "Site and docs for RainbowKit.",
"private": true,
"dependencies": {
Expand Down Expand Up @@ -35,8 +35,8 @@
"three": "^0.139.2",
"unified": "10.1.2",
"unist-util-visit": "4.1.0",
"viem": "^2.0.6",
"wagmi": "^2.2.0",
"viem": "^2.4.1",
"wagmi": "^2.3.1",
"@tanstack/react-query": "^5.17.9"
},
"devDependencies": {
Expand Down

0 comments on commit ca31675

Please sign in to comment.