Skip to content

Commit 2dca5f2

Browse files
committed
fix: show connect wallet and logined same time
1 parent 4b9fc06 commit 2dca5f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pages/_app.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function App({ Component, pageProps }) {
2929
const isSupportCurrentNetwork = SUPPORT_NETWORKS.includes(chainId)
3030
const [backendVersion, setBackendVersion] = useState("err")
3131

32-
const [, actions] = useAsync(async() => {
32+
const [autoLoginState, actions] = useAsync(async() => {
3333
if (!sigInLocal || !accountInLocal) return
3434
const cachedProvider = await createProvider(undefined, (id) => dispatch({ type: "SET_CHAIN_ID", chainId: id }))
3535
if (!cachedProvider) return
@@ -117,6 +117,7 @@ function App({ Component, pageProps }) {
117117

118118

119119
const renderActionButton = () => {
120+
if (!['success', 'error'].includes(autoLoginState.status)) return null
120121
if (!sigInLocal || !accountInLocal) {
121122
return (
122123
<button

0 commit comments

Comments
 (0)