vault recent orders (status bugfix)
This commit is contained in:
5
cache.js
5
cache.js
@@ -29,9 +29,9 @@ export class CacheDict {
|
||||
this.series = series
|
||||
}
|
||||
|
||||
async get(chain, key) {
|
||||
async get(chain, key, default_=null) {
|
||||
const result = await redis.hGet(`${chain}|${this.series}`, key)
|
||||
return result === null ? null : '' + result
|
||||
return result === null ? default_ : '' + result
|
||||
}
|
||||
|
||||
async contains(chain, key) {
|
||||
@@ -80,5 +80,6 @@ export const vaultBalances = new CacheDict('vb')
|
||||
export const prices = new CacheDict('p')
|
||||
export const orderStatuses = new CacheDict('o')
|
||||
export const vaultOpenOrders = new CacheDict('voo')
|
||||
export const vaultRecentlyClosedOrders = new CacheDict('vrco')
|
||||
export const orderFilled = new CacheDict('of')
|
||||
export const ohlcs = new CacheDict('ohlc')
|
||||
|
||||
Reference in New Issue
Block a user