Skip to content

Commit

Permalink
Merge pull request #137 from lidofinance/fix/checkIfDisconnectMakesSense
Browse files Browse the repository at this point in the history
Fix: checkIfDisconnectMakesSense
  • Loading branch information
alx-khramov committed Apr 12, 2024
2 parents c63a62c + 7556749 commit 80086cd
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
6 changes: 6 additions & 0 deletions packages/core-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @reef-knot/core-react

## 3.1.1

### Patch Changes

- 92be1c7: Fix "checkIfDisconnectMakesSense"

## 3.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reef-knot/core-react",
"version": "3.1.0",
"version": "3.1.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
Expand Down
6 changes: 3 additions & 3 deletions packages/core-react/src/hooks/useDisconnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export const useDisconnect = (): {
// It doesn't make sense to offer a user the ability to disconnect if the user is not connected yet,
// or if the user was connected automatically
const autoConnectOnlyConnectors = getAutoConnectOnlyConnectors();
return (
isConnected &&
autoConnectOnlyConnectors.some((c) => c.id === connector?.id)
const isConnectorNotAutoConnectOnly = autoConnectOnlyConnectors.every(
(c) => c.id !== connector?.id,
);
return isConnected && isConnectorNotAutoConnectOnly;
};

return {
Expand Down
8 changes: 8 additions & 0 deletions packages/reef-knot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# reef-knot

## 4.1.1

### Patch Changes

- 92be1c7: Fix "checkIfDisconnectMakesSense"
- Updated dependencies [92be1c7]
- @reef-knot/core-react@3.1.1

## 4.1.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/reef-knot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reef-knot",
"version": "4.1.0",
"version": "4.1.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
Expand Down Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"@reef-knot/connect-wallet-modal": "4.1.0",
"@reef-knot/core-react": "3.1.0",
"@reef-knot/core-react": "3.1.1",
"@reef-knot/web3-react": "3.0.0",
"@reef-knot/ui-react": "1.1.0",
"@reef-knot/wallets-list": "1.13.1",
Expand Down

0 comments on commit 80086cd

Please sign in to comment.