Skip to content

Commit

Permalink
pass test?
Browse files Browse the repository at this point in the history
  • Loading branch information
iMac7 committed Dec 17, 2024
1 parent 5c71225 commit 25fe16d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions unlock-app/src/hooks/useCheckoutCommunication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { OAuthConfig } from '~/unlockTypes'
import { useProvider } from './useProvider'
import { isInIframe } from '~/utils/iframe'
import { postToWebhook } from '~/components/interface/checkout/main/checkoutHookUtils'
import { useAuthenticate } from './useAuthenticate'
// import { useAuthenticate } from './useAuthenticate'

export interface UserInfo {
address?: string
Expand Down Expand Up @@ -115,7 +115,7 @@ export const resolveOnEvent = (name: string) => {
// directly.
export const useCheckoutCommunication = () => {
const { setProvider } = useProvider()
const { account } = useAuthenticate()
// const { account } = useAuthenticate()
const [outgoingBuffer, setOutgoingBuffer] = useState([] as BufferedEvent[])
const [incomingBuffer, setIncomingBuffer] = useState([] as MethodCall[])
const [paywallConfig, setPaywallConfig] = useState<
Expand Down Expand Up @@ -228,12 +228,12 @@ export const useCheckoutCommunication = () => {
}
setUser(info.address)
pushOrEmit(CheckoutEvents.userInfo, info)
account && postToWebhook(info, paywallConfig, 'authenticated')
postToWebhook(info, paywallConfig, 'authenticated')
}

const emitMetadata = (metadata: any, paywallConfig?: any) => {
pushOrEmit(CheckoutEvents.metadata, metadata)
account && postToWebhook(metadata, paywallConfig, 'metadata')
postToWebhook(metadata, paywallConfig, 'metadata')
}

const emitCloseModal = () => {
Expand All @@ -242,7 +242,7 @@ export const useCheckoutCommunication = () => {

const emitTransactionInfo = (info: TransactionInfo, paywallConfig?: any) => {
pushOrEmit(CheckoutEvents.transactionInfo, info)
account && postToWebhook(info, paywallConfig, 'transactionSent')
postToWebhook(info, paywallConfig, 'transactionSent')
}

const emitMethodCall = (call: MethodCall) => {
Expand Down

0 comments on commit 25fe16d

Please sign in to comment.