¿Cómo obtener los resultados "_pathsArr (incluida la identificación media), bestPath y las cantidades_fuera" en console.log?
Básicamente, necesito los arrPaths, incluida su identificación y la cantidad de cada uno.
También necesito saber dónde ingresar manualmente la cantidad_en para pruebas temporales.
Gracias.
Este es mi código:
import { toFixed, accDiv } from './public'; // import Worker from './worker' // import VueWorker from 'vue-worker' class swapRouter { constructor() { this.markets = []; this.pair_market_map = {}; this.mid_market_map = {}; this.tokens = []; this.paths = []; this.isInit = false; this._pathsArr = []; this.bestPath = ''; } init(data, vThis) { this.markets = data || []; this._pathsArr = []; this.bestPath = ''; if (this.paths.length) { return } if (window.Worker) { this.workerToInitPath(vThis) } else { this.initPath() } } workerToInitPath(vThis) { HERE GOES THE CODE THAT FINDS THE PATHS AND AMOUNTS_OUT } const d = [{ here are the data correctly organized } const swapRouter1 = new swapRouter() swapRouter1.init(d) console.log(swapRouter1);¿Está esto correctamente declarado?
this.bestPath = '';O debe ser:
this.bestPath = [];Porque obtenga solo mercados, tokens y rutas en el resultado (console.log), pero no obtenga_pathsArr y bestPath.
También necesito que los resultados de la ruta incluyan el "medio" (el número de identificación).