"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.getCurrencyConditions=void 0;const db_1=require("@b/db"),cache_1=require("@b/utils/cache"),getCurrencyConditions=async()=>{const e=await db_1.models.currency.findAll({where:{status:!0},attributes:["id"]}),t=await db_1.models.exchangeCurrency.findAll({where:{status:!0},attributes:["currency"]});let r=[];const n=cache_1.CacheManager.getInstance();if((await n.getExtensions()).has("ecosystem")){const e=await db_1.models.ecosystemToken.findAll({where:{status:!0},attributes:["currency"]});r=Array.from(new Set(e.filter(e=>e.currency&&e.currency.trim().length>0).map(e=>e.currency))).map(e=>({value:e,label:e}))}return{FIAT:e.map(e=>({value:e.id,label:e.id})),SPOT:t.map(e=>({value:e.currency,label:e.currency})),ECO:r}};exports.getCurrencyConditions=getCurrencyConditions;