Skip to content

Commit

Permalink
test(dcellar-web-ui): add wallet log
Browse files Browse the repository at this point in the history
  • Loading branch information
wenty22 committed Aug 7, 2023
1 parent 635e1bc commit f156044
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/dcellar-web-ui/src/context/LoginContext/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export function LoginContextProvider(props: PropsWithChildren<LoginContextProvid
const { pathname } = useRouter();
const { address: walletAddress, connector } = useAccount();

console.log(walletAddress, loginAccount, connector)

useEffect(() => {
if (pathname === '/' || inline) return;

Expand All @@ -53,7 +55,7 @@ export function LoginContextProvider(props: PropsWithChildren<LoginContextProvid

// Once the wallet is connected, we can get the address
// but if wallet is locked, we can't get the connector from wagmi
// to avoid errors when using the connector, we treat this situation as not log in.
// to avoid errors when using the connector, we treat this situation as logout.
const timer = setTimeout(() => {
if (!connector) {
logout()
Expand Down

0 comments on commit f156044

Please sign in to comment.