Skip to content

Commit

Permalink
Merge pull request #50 from argentlabs/fix/avoid-modal-one-connector
Browse files Browse the repository at this point in the history
fix: don't show modal if only one connector is defined
  • Loading branch information
bluecco authored Dec 29, 2023
2 parents f56daf1 + 00a65a4 commit 2f14c35
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 2f14c35

Please sign in to comment.