uniswap-interface-uncensored/src/hooks/useIsArgentWallet.ts
Moody Salem 03913d9c0b
UNI
2020-09-24 11:29:31 -05:00

11 lines
501 B
TypeScript

import { NEVER_RELOAD, useSingleCallResult } from '../state/multicall/hooks'
import { useActiveWeb3React } from './index'
import { useArgentWalletDetectorContract } from './useContract'
export default function useIsArgentWallet(): boolean {
const { account } = useActiveWeb3React()
const argentWalletDetector = useArgentWalletDetectorContract()
const call = useSingleCallResult(argentWalletDetector, 'isArgentWallet', [account ?? undefined], NEVER_RELOAD)
return call?.result?.[0] ?? false
}