Skip to content

Commit

Permalink
fix: don't show modal if only one connector is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecco committed Dec 29, 2023
1 parent f56daf1 commit 00a65a4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/modal/Modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
export let theme: "light" | "dark" | null = null
let loadingItem: string | false = false
let emailOnly =
modalWallets.length === 1 &&
modalWallets[0].id.toLowerCase().includes("webwallet")
let starknetMobile = window?.starknet_argentX as StarknetWindowObject & {
isInAppBrowser: boolean
Expand Down Expand Up @@ -59,7 +56,7 @@
return
}
if (emailOnly) {
if (modalWallets.length === 1) {
try {
const [wallet] = modalWallets
await wallet.connector?.connect()
Expand All @@ -71,7 +68,7 @@
})
</script>

{#if !isInAppBrowser && !emailOnly}
{#if !isInAppBrowser && modalWallets.length > 1}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class={`modal-font backdrop-blur-sm fixed inset-0 flex items-center
Expand Down

0 comments on commit 00a65a4

Please sign in to comment.