"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.maybeTronEmptyAccount = void 0;
const errors_1 = require("@ledgerhq/errors");
const maybeTronEmptyAccount = (swapTransaction) => {
    if (swapTransaction?.swap?.to?.currency?.type === "TokenCurrency" &&
        swapTransaction?.swap?.to?.currency?.tokenType === "trc20" &&
        swapTransaction?.swap?.to?.parentAccount?.balance.lt(100_000)) {
        return new errors_1.TronEmptyAccount("PREVENT_RECEIVING_TRC20_ON_EMPTY_ACCOUNT", {
            links: [
                "https://support.ledger.com/hc/en-us/articles/6516823445533-Activate-Tron-account-to-send-or-receive-Tron-tokens?support=true",
            ],
        });
    }
};
exports.maybeTronEmptyAccount = maybeTronEmptyAccount;
//# sourceMappingURL=maybeTronEmptyAccount.js.map