mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-22 17:22:04 -07:00
fix(hydrateUtxos): Allow users to pass in utxoDelay
This commit is contained in:
@@ -1979,6 +1979,11 @@ class Slp {
|
||||
try {
|
||||
const utxos = req.body.utxos
|
||||
|
||||
// Extract a delay value if the user passed it in.
|
||||
const usrObjIn = req.body.usrObj
|
||||
let utxoDelay = 0
|
||||
if (usrObjIn && usrObjIn.utxoDelay) { utxoDelay = usrObjIn.utxoDelay }
|
||||
|
||||
// console.log('req: ', req)
|
||||
// console.log(`req._remoteAddress: ${req._remoteAddress}`)
|
||||
|
||||
@@ -1988,7 +1993,8 @@ class Slp {
|
||||
ip: req._remoteAddress,
|
||||
jwtToken: req.locals.jwtToken,
|
||||
proLimit: req.locals.proLimit,
|
||||
apiLevel: req.locals.apiLevel
|
||||
apiLevel: req.locals.apiLevel,
|
||||
utxoDelay
|
||||
}
|
||||
|
||||
// Validate inputs
|
||||
@@ -2049,7 +2055,8 @@ class Slp {
|
||||
|
||||
res.status(500)
|
||||
return res.json({
|
||||
error: 'Error in hydrateUtxos()'
|
||||
error: 'Undetermined error in hydrateUtxos()',
|
||||
message: err.message
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user