"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useConnectEagerly = exports.useWeb3React = void 0;
var react_1 = require("react");
var utils_1 = require("../utils");
var core_1 = require("@web3-react/core");
Object.defineProperty(exports, "useWeb3React", { enumerable: true, get: function () { return core_1.useWeb3React; } });
function useConnectEagerly() {
    (0, react_1.useEffect)(function () {
        var storedName = localStorage.getItem('connector');
        if (storedName === 'MetaMask' && utils_1.metaMask.connectEagerly) {
            utils_1.metaMask.connectEagerly();
        }
        else if (storedName === 'WalletConnect V1 (Deprecated)' &&
            utils_1.walletConnect.connectEagerly) {
            utils_1.walletConnect.connectEagerly();
        }
        else if (storedName === 'WalletConnect V2' &&
            utils_1.walletConnectV2.connectEagerly) {
            utils_1.walletConnectV2.connectEagerly();
        }
    }, []);
}
exports.useConnectEagerly = useConnectEagerly;
//# sourceMappingURL=web3.js.map