UNPKG

@abstract-foundation/agw-react

Version:
26 lines 832 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useGlobalWalletSignerAccount = useGlobalWalletSignerAccount; const wagmi_1 = require("wagmi"); function useGlobalWalletSignerAccount(parameters = {}) { const account = (0, wagmi_1.useAccount)(parameters); if (!account.addresses?.[1]) { return { address: undefined, addresses: undefined, chain: undefined, chainId: undefined, connector: undefined, isConnected: false, isReconnecting: false, isConnecting: false, isDisconnected: true, status: 'disconnected', }; } return { ...account, address: account.addresses[1], }; } //# sourceMappingURL=useGlobalWalletSignerAccount.js.map