ordershapes

This commit is contained in:
tim
2024-09-15 00:59:47 -04:00
parent 80e03f648b
commit 09ef4c5f43
10 changed files with 295 additions and 92 deletions

View File

@@ -144,7 +144,7 @@ function addSymbol(p, base, quote, inverted) {
const description = `${base.n} / ${quote.n}`
const type = 'swap'
const pools = [[p.a, p.f]]
const decimals = p.d
const decimals = inverted ? -p.d : p.d
_symbols[key] = {
ticker: key, full_name, symbol, description,
exchange, type, inverted, base, quote, pools, decimals, x:p.x
@@ -221,7 +221,7 @@ function getAllSymbols() {
return _symbols
}
export function lookupSymbol(key) { // lookup by fullname
export function lookupSymbol(key) { // lookup by ticker which is "0xbaseAddress/0xquoteAddress"
return getAllSymbols()[key]
}