Skip to content

Commit

Permalink
feat: clear selected provider id supported on signing out to turn on …
Browse files Browse the repository at this point in the history
…the wallet selection modal each time the user disconnects his wallet
  • Loading branch information
fess-v authored and kyranjamie committed Feb 14, 2024
1 parent f989d61 commit 4115cc3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@stacks/auth": "6.9.0",
"@stacks/blockchain-api-client": "7.3.2",
"@stacks/common": "6.8.1",
"@stacks/connect": "7.6.0",
"@stacks/connect": "7.7.0",
"@stacks/connect-react": "22.4.0",
"@stacks/network": "6.8.1",
"@stacks/stacking": "6.9.0",
Expand Down
23 changes: 21 additions & 2 deletions pnpm-lock.yaml

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

3 changes: 2 additions & 1 deletion src/components/auth-provider/auth-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ReactNode, createContext, useContext, useState } from 'react';

import { UserData } from '@stacks/auth';
import { AppConfig, UserSession, showConnect } from '@stacks/connect';
import { AppConfig, UserSession, disconnect, showConnect } from '@stacks/connect';
import { validateStacksAddress as isValidStacksAddress } from '@stacks/transactions';
import { APP_DETAILS } from 'src/constants';

Expand Down Expand Up @@ -72,6 +72,7 @@ export function AuthProvider({ children }: Props) {

function signOut() {
userSession.signUserOut();
disconnect();
setIsSignedIn(false);
}

Expand Down

0 comments on commit 4115cc3

Please sign in to comment.