nova-ui/services/connectors/index.ts
2022-12-04 07:02:30 +01:00

12 lines
293 B
TypeScript

import { SUPPORTED_WALLETS } from '@/constants'
import { AbstractProvider } from '@/services'
export function getWalletProvider(key: string) {
const wallet = SUPPORTED_WALLETS[String(key).toUpperCase()]
const provider = wallet.connector()
return new AbstractProvider({ provider })
}