orderbuild fixes; tranche table work; ordershapes still broken

This commit is contained in:
tim
2024-09-20 04:12:23 -04:00
parent ce54b943ea
commit e5d5c9c0d8
10 changed files with 111 additions and 48 deletions

View File

@@ -222,7 +222,17 @@ function getAllSymbols() {
}
export function lookupSymbol(key) { // lookup by ticker which is "0xbaseAddress/0xquoteAddress"
return getAllSymbols()[key]
const symbols = getAllSymbols();
if (!(key in symbols)) {
// check the inverted symbol
const [base,quote] = key.split('/')
key = quote+'/'+base
if (!(key in symbols)) {
console.error('no symbol found for key', key, symbols)
return null
}
}
return symbols[key]
}
function checkBar(bar, msg) {