Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
kuco23 committed Nov 18, 2024
1 parent c8efa12 commit 79fd8bf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/frontend/src/ts/components/eip6963.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ import type { EIP6963AnnounceProviderEvent, EIP6963ProviderDetail, MetaMaskInpag
declare const window: any

export async function ensureOrForceEip1193(): Promise<EIP6963ProviderDetail> {
if (globals.connectedAccount !== undefined) {
return globals.connectedWallet!
}
if (providers.length > 0) {
if (globals.connectedAccount === undefined && providers.length > 0) {
await onWalletConnectClick(providers[0], false)
}
if (globals.connectedAccount !== undefined) {
Expand Down

0 comments on commit 79fd8bf

Please sign in to comment.