orderbuild fixes; tranche table work; ordershapes still broken
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user