import { AbstractConnector } from '@web3-react/abstract-connector' ; import { Web3Error } from 'types/Error' ; import { WalletName , GNOSIS_SAFE } from 'types/Wallet' ; import AuthenticateWalletPendingGnosisSafe from './AuthenticateWalletPendingGnosisSafe' ; import AuthenticateWalletPendingDefault from './AuthenticateWalletPendingDefault' ; type Props = { pendingWallet : AbstractConnector ; userFriendlyWalletName : string ; setDetectedError : ( error : Web3Error ) => void ; walletName : WalletName ; } ; function AuthenticateWalletPending ( { pendingWallet , userFriendlyWalletName , setDetectedError , walletName , } ) { if ( walletName === GNOSIS_SAFE ) { return ( < AuthenticateWalletPendingGnosisSafe pendingWallet = { pendingWallet } userFriendlyWalletName = { userFriendlyWalletName } setDetectedError = { setDetectedError } / > ) ; } return ( < AuthenticateWalletPendingDefault pendingWallet = { pendingWallet } userFriendlyWalletName = { userFriendlyWalletName } setDetectedError = { setDetectedError } / > ) ; } export default AuthenticateWalletPending ;