Skip to content

Commit

Permalink
fix: ssr no need to wait for the provider to be ready (#173)
Browse files Browse the repository at this point in the history
* feat: Upgrade wagmi

* refactor: Optimize code

* feat: Update examples

* feat: Add customized life cycle for `injected`

* feat: Update docs

* docs: Add changelog

* chore: update versions (alpha) (#162)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Merge branch 'main' into dev

* feat: Update README.md

* fix: ssr no need to wait for the provider to be ready

* fix: ssr no need to wait for the provider to be ready (#165)

* Merge branch 'main' into dev

* feat: Update README.md

* fix: ssr no need to wait for the provider to be ready

* chore: update versions (alpha) (#166)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* test: Add log

* chore: update versions (alpha) (#170)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 29, 2024
1 parent 5426e5e commit 5b7f3f6
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nervous-penguins-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@node-real/walletkit': patch
---

test: Add log
14 changes: 14 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"mode": "pre",
"tag": "alpha",
"initialVersions": {
"example-nextjs": "0.0.1",
"example-vite": "0.0.1",
"@node-real/walletkit": "2.0.2",
"website": "0.0.1"
},
"changesets": [
"nervous-penguins-confess",
"quick-squids-rush"
]
}
5 changes: 5 additions & 0 deletions .changeset/quick-squids-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@node-real/walletkit': patch
---

fix: ssr no need to wait for the provider to be ready
7 changes: 7 additions & 0 deletions packages/walletkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @node-real/walletkit

## 2.0.3-alpha.0

### Patch Changes

- d5437a7: test: Add log
- 90846a4: fix: ssr no need to wait for the provider to be ready

## 2.0.2

### Patch Changes
Expand Down
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.0.2",
"version": "2.0.3-alpha.0",
"author": "node-real",
"private": false,
"description": "WalletKit is a React component library for easily connecting a wallet to your dApp.",
Expand Down
8 changes: 8 additions & 0 deletions packages/walletkit/src/modals/ConnectModal/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@ function WithRouter(props: ConnectModalProviderProps) {
}, [isOpen, onClose, onOpen, router, setAction]);

useEffect(() => {
console.log(
'route: ',
router.route,
router.route !== routes.CONNECTORS,
isConnected,
options.closeModalAfterConnected,
);
if (router.route !== routes.CONNECTORS && isConnected && options.closeModalAfterConnected) {
console.log('onClose: ', value?.onClose);
value?.onClose();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit 5b7f3f6

Please sign in to comment.