Skip to content

Commit

Permalink
Do not auto select wallet extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
thesan committed Jun 27, 2024
1 parent 3e87533 commit 645192a
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { FC, useEffect } from 'react'
import { useHistory } from 'react-router'
import styled from 'styled-components'

import { useMyAccounts } from '@/accounts/hooks/useMyAccounts'
import { ButtonPrimary } from '@/common/components/buttons'
import { ArrowDownExpandedIcon, Icon, Loader } from '@/common/components/icons'
import { BorderRad, Colors, Transitions } from '@/common/constants'
Expand All @@ -19,7 +18,6 @@ import { EmailSubscriptionModalCall } from '../../modals/EmailSubscriptionModal'
import { SwitchMemberModalCall } from '../../modals/SwitchMemberModal'

export const CurrentMember = () => {
const { allWallets, setWallet } = useMyAccounts()
const { status, isLoading } = useOnBoarding()
const { members, hasMembers, active } = useMyMemberships()
const { showModal, modal } = useModal()
Expand Down Expand Up @@ -57,18 +55,14 @@ export const CurrentMember = () => {
}
}, [emailVerificationToken])

const handleOnboarding = () => {
const wallets = allWallets.filter((wallet) => wallet.installed)
if (wallets.length === 1) {
setWallet?.(wallets.at(-1))
}
showModal({ modal: 'OnBoardingModal' })
}

if (status !== 'finished') {
return (
<MembershipButtonsWrapper>
<MembershipActionButton onClick={handleOnboarding} size="large" disabled={isLoading}>
<MembershipActionButton
onClick={() => showModal({ modal: 'OnBoardingModal' })}
size="large"
disabled={isLoading}
>
{isLoading && <Loader />}
{status === 'installPlugin' ? 'Connect Wallet' : 'Join Now'}
</MembershipActionButton>
Expand Down

0 comments on commit 645192a

Please sign in to comment.