'use client'
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

/**
 * Embedded Bitcoin wallets expose a per-network payment address (one key,
 * network-tagged additional addresses). The connector swaps its active
 * address when the selected network changes, so per-network UI (displayed
 * address, deposit QR, balance queries) must read the connector's active
 * address rather than the wallet's static primary (mainnet) address.
 *
 * @returns the active address for embedded Bitcoin connectors, undefined otherwise
 */
const getEmbeddedBitcoinActiveAddress = (connector) => {
    if (!connector ||
        connector.connectedChain !== 'BTC' ||
        !connector.isEmbeddedWallet) {
        return undefined;
    }
    return connector.activeAccountAddress;
};

exports.getEmbeddedBitcoinActiveAddress = getEmbeddedBitcoinActiveAddress;
