chart-based route finding
This commit is contained in:
@@ -57,7 +57,7 @@ function addSymbol(p, base, quote, inverted) {
|
||||
const longExchange = ['Uniswap v2', 'Uniswap v3',][p.e]
|
||||
const description = `${base.n} / ${quote.n}`
|
||||
const type = 'swap'
|
||||
_symbols[full_name] = {symbol, full_name, description, exchange, type, inverted,}
|
||||
_symbols[full_name] = {symbol, full_name, description, exchange, type, inverted, base, quote}
|
||||
indexes[full_name] = {
|
||||
// key
|
||||
id: full_name,
|
||||
@@ -84,7 +84,6 @@ function addSymbol(p, base, quote, inverted) {
|
||||
// }
|
||||
|
||||
async function getAllSymbols() {
|
||||
|
||||
if (_symbols===null) {
|
||||
_symbols = {}
|
||||
for (const t of metadata.t)
|
||||
@@ -112,6 +111,10 @@ async function getAllSymbols() {
|
||||
return _symbols
|
||||
}
|
||||
|
||||
export function lookupSymbol(fullName) {
|
||||
return _symbols[fullName]
|
||||
}
|
||||
|
||||
export default {
|
||||
onReady: (callback) => {
|
||||
console.log('[onReady]: Method call');
|
||||
|
||||
Reference in New Issue
Block a user