2022-05-02 17:16:57 +00:00
|
|
|
import type { Web3ReactHooks } from '@web3-react/core';
|
2022-03-25 07:44:10 +00:00
|
|
|
import { Web3ReactProvider } from '@web3-react/core';
|
2022-05-02 17:16:57 +00:00
|
|
|
import type { Connector } from '@web3-react/types';
|
2022-03-25 07:44:10 +00:00
|
|
|
|
|
|
|
interface Web3ProviderProps {
|
|
|
|
children: JSX.Element | JSX.Element[];
|
2022-05-02 17:16:57 +00:00
|
|
|
connectors: [Connector, Web3ReactHooks][];
|
2022-03-25 07:44:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const Web3Provider = ({ children, connectors }: Web3ProviderProps) => {
|
|
|
|
return (
|
2022-05-02 17:16:57 +00:00
|
|
|
<Web3ReactProvider connectors={connectors}>{children}</Web3ReactProvider>
|
2022-03-25 07:44:10 +00:00
|
|
|
);
|
|
|
|
};
|