mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-22 09:12:05 -07:00
fix(bch-js): Bumping to v4.15.7
This commit is contained in:
@@ -136,9 +136,13 @@ class RateLimits {
|
||||
// For internal calls that make a lot of internal calls, like
|
||||
// hydrateUtxoDetails(), the origin of the caller will be passed in
|
||||
// via the POST body.
|
||||
const keyIsLocal = key.includes('172.17.0.1') || key.includes('127.0.0.1')
|
||||
if (req.body && req.body.ip && keyIsLocal) {
|
||||
key = req.body.ip
|
||||
const keyIsLocal =
|
||||
key.includes('172.17.0.1') || key.includes('127.0.0.1')
|
||||
if (req.body && req.body.usrObj && keyIsLocal) {
|
||||
// key = req.body.ip
|
||||
console.log(
|
||||
`route-ratelimit usrObj: ${JSON.stringify(req.body.usrObj, null, 2)}`
|
||||
)
|
||||
}
|
||||
console.log(`key: ${key}`)
|
||||
|
||||
@@ -297,7 +301,9 @@ class RateLimits {
|
||||
|
||||
return retVal
|
||||
} catch (err) {
|
||||
wlogger.error('Error in route-ratelimit.js/isInWhitelist(). Returning false by default.')
|
||||
wlogger.error(
|
||||
'Error in route-ratelimit.js/isInWhitelist(). Returning false by default.'
|
||||
)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-2
@@ -1979,8 +1979,16 @@ class Slp {
|
||||
try {
|
||||
const utxos = req.body.utxos
|
||||
|
||||
// console.log('req: ', req)
|
||||
console.log(`req._remoteAddress: ${req._remoteAddress}`)
|
||||
const ip = req._remoteAddress
|
||||
// const ip = req._remoteAddress
|
||||
|
||||
const usrObj = {
|
||||
ip: req._remoteAddress,
|
||||
jwtToken: req.locals.jwtToken,
|
||||
proLimit: req.locals.proLimit,
|
||||
apiLevel: req.locals.apiLevel
|
||||
}
|
||||
|
||||
// Validate inputs
|
||||
if (!Array.isArray(utxos)) {
|
||||
@@ -2016,7 +2024,7 @@ class Slp {
|
||||
const theseUtxos = utxos[i].utxos
|
||||
|
||||
// Get SLP token details.
|
||||
const details = await _this.bchjs.SLP.Utils.tokenUtxoDetails(theseUtxos, ip)
|
||||
const details = await _this.bchjs.SLP.Utils.tokenUtxoDetails(theseUtxos, usrObj)
|
||||
// console.log('details: ', details)
|
||||
|
||||
// Replace the original UTXO data with the hydrated data.
|
||||
|
||||
Reference in New Issue
Block a user