Skip to content

Commit

Permalink
remove connecting waas
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTxbi committed Oct 17, 2024
1 parent fb3e80b commit 5d95dc9
Showing 3 changed files with 11 additions and 164 deletions.
36 changes: 10 additions & 26 deletions unlock-app/src/components/interface/checkout/Connect/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useState } from 'react'
import { useCallback, useEffect, useState } from 'react'
import { useCheckoutCommunication } from '~/hooks/useCheckoutCommunication'
import type { OAuthConfig } from '~/unlockTypes'

@@ -8,9 +8,7 @@ import { ConnectPage } from '../main/ConnectPage'
import { TopNavigation } from '../Shell'
import { useAuth } from '~/contexts/AuthenticationContext'
import { PaywallConfigType } from '@unlock-protocol/core'
import { useSIWE } from '~/hooks/useSIWE'
import { signOut, useSession } from 'next-auth/react'
import ConnectingWaas from '../../connect/ConnectingWaas'
import { signOut } from 'next-auth/react'
import { isInIframe } from '~/utils/iframe'

interface Props {
@@ -96,12 +94,6 @@ export function Connect({ oauthConfig, communication }: Props) {
}
}, [account])

const { connected } = useAuth()
const { isSignedIn } = useSIWE()

const { data: session } = useSession()
const isLoadingWaas = session && (!connected || !isSignedIn || account === '')

return (
<div className="bg-white z-10 shadow-xl max-w-md rounded-xl flex flex-col w-full h-[90vh] sm:h-[80vh] min-h-[32rem] max-h-[42rem]">
<TopNavigation onClose={onClose} />
@@ -110,22 +102,14 @@ export function Connect({ oauthConfig, communication }: Props) {
<Stepper state={state} />
</div>
</div>
{isLoadingWaas ? (
<div className="pt-6">
<ConnectingWaas openConnectModalWindow={false} />
</div>
) : (
<>
{!account && <ConnectPage style="h-full mt-4 space-y-5" />}
{account && (
<ConfirmConnect
className="h-full mt-4 space-y-5"
communication={communication}
onClose={onClose}
oauthConfig={oauthConfig}
/>
)}
</>
{!account && <ConnectPage style="h-full mt-4 space-y-5" />}
{account && (
<ConfirmConnect
className="h-full mt-4 space-y-5"
communication={communication}
onClose={onClose}
oauthConfig={oauthConfig}
/>
)}
</div>
)
4 changes: 1 addition & 3 deletions unlock-app/src/components/interface/checkout/main/Select.tsx
Original file line number Diff line number Diff line change
@@ -384,8 +384,6 @@ export function Select({ checkoutService }: Props) {
return hook
}, [lockHookMapping, lock])

const [isSigning, setSigning] = useState(false)

const { isSignedIn } = useSIWE()
const useDelegatedProvider = paywallConfig?.useDelegatedProvider

@@ -397,7 +395,7 @@ export function Select({ checkoutService }: Props) {
(lock?.isSoldOut && !(membership?.member || membership?.expired)) ||
isNotExpectedAddress ||
isLoadingHook ||
(isSigning && !isSignedIn)
!isSignedIn

useEffect(() => {
if (locks?.length) {
135 changes: 0 additions & 135 deletions unlock-app/src/components/interface/connect/ConnectingWaas.tsx

This file was deleted.

0 comments on commit 5d95dc9

Please sign in to comment.