vega-frontend-monorepo/libs/web3/src/lib/web3-provider.tsx
Matthew Russell 1d8de701c9
Use types from web3-react library
export connectors to avoid needless data manipulation, use built in types from web3-react (#310)
2022-05-02 13:16:57 -04:00

15 lines
458 B
TypeScript

import type { Web3ReactHooks } from '@web3-react/core';
import { Web3ReactProvider } from '@web3-react/core';
import type { Connector } from '@web3-react/types';
interface Web3ProviderProps {
children: JSX.Element | JSX.Element[];
connectors: [Connector, Web3ReactHooks][];
}
export const Web3Provider = ({ children, connectors }: Web3ProviderProps) => {
return (
<Web3ReactProvider connectors={connectors}>{children}</Web3ReactProvider>
);
};