"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPlatformERC20TokenCurrency = exports.isPlatformCryptoCurrency = exports.isPlatformSupportedCurrency = void 0;
const currencies_1 = require("../currencies");
const types_1 = require("./types");
const helpers_1 = require("../helpers");
function isPlatformSupportedCurrency(currency) {
    if ((0, currencies_1.isCryptoCurrency)(currency)) {
        return (0, helpers_1.includes)(types_1.PLATFORM_FAMILIES, currency.family);
    }
    if ((0, currencies_1.isTokenCurrency)(currency)) {
        return (0, helpers_1.includes)(types_1.PLATFORM_FAMILIES, currency.parentCurrency.family);
    }
    return false;
}
exports.isPlatformSupportedCurrency = isPlatformSupportedCurrency;
function isPlatformCryptoCurrency(currency) {
    return currency.type === types_1.PlatformCurrencyType.CryptoCurrency;
}
exports.isPlatformCryptoCurrency = isPlatformCryptoCurrency;
function isPlatformERC20TokenCurrency(currency) {
    return currency.standard === "ERC20";
}
exports.isPlatformERC20TokenCurrency = isPlatformERC20TokenCurrency;
//# sourceMappingURL=helpers.js.map