Skip to content

Commit

Permalink
fix: forge to use fallback fn
Browse files Browse the repository at this point in the history
  • Loading branch information
yqrashawn committed Jun 30, 2021
1 parent 80befb1 commit a12a402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useConfluxPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function useConfluxPortal(tokenAddrs = []) {
const login = async (fallbackFn) => {
if (!window?.conflux) return
const hasAddr = !!address && (await window.conflux.send('cfx_accounts')).length
if (hasAddr) return
if (hasAddr) return typeof fallbackFn === 'function' ? fallbackFn() : undefined
return window.conflux
.send('cfx_requestAccounts')
.then(
Expand Down

0 comments on commit a12a402

Please sign in to comment.