Merge pull request #5 from Uniswap/geocheck-analytics
feat: add analytics for moonpay ip check
This commit is contained in:
commit
3e0788092e
@ -1,3 +1,4 @@
|
||||
import { sendAnalyticsEvent } from '@uniswap/analytics'
|
||||
import { DEFAULT_TXN_DISMISS_MS } from 'constants/misc'
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import { useAppDispatch, useAppSelector } from 'state/hooks'
|
||||
@ -51,6 +52,7 @@ export function useFiatOnrampAvailability(shouldCheck: boolean, callback?: () =>
|
||||
setLoading(true)
|
||||
try {
|
||||
const result = await getMoonpayAvailability()
|
||||
sendAnalyticsEvent('MoonPay Geochecker', { success: result })
|
||||
if (stale) return
|
||||
dispatch(setFiatOnrampAvailability(result))
|
||||
if (result && callback) {
|
||||
|
Loading…
Reference in New Issue
Block a user