fix(electrumx): Allowing POST balance to circumvent cache

This commit is contained in:
Chris Troutner
2022-04-25 15:22:49 -07:00
parent d60f1f117e
commit 6c977a912e
+8 -1
View File
@@ -199,9 +199,16 @@ class Electrum {
console.log('req.locals: ', req.locals) console.log('req.locals: ', req.locals)
// Use the cache for anonymous users. If the user has a valid JWT token
// or is using Basic Authentiation, then do not use the cache.
let useCache = true
if (req.locals.proLimit || req.locals.apiLevel > 10) {
useCache = false
}
const response = await _this.axios.post( const response = await _this.axios.post(
`${_this.fulcrumApi}electrumx/balance/`, `${_this.fulcrumApi}electrumx/balance/`,
{ addresses } { addresses, useCache }
) )
res.status(200) res.status(200)