mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-21 16:52:04 -07:00
Merge pull request #177 from Permissionless-Software-Foundation/ct-unstable
fix(PsfSlpIndexer): Adding optional tx history flag to slp/tx endpoint
This commit is contained in:
@@ -183,7 +183,7 @@ class PsfSlpIndexer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {post} /psf/slp/tokenStats/ List stats for a single slp token.
|
* @api {post} /psf/slp/token List stats for a single slp token.
|
||||||
* @apiName List stats for a single slp token.
|
* @apiName List stats for a single slp token.
|
||||||
* @apiGroup PSF SLP
|
* @apiGroup PSF SLP
|
||||||
* @apiDescription Return list stats for a single slp token.
|
* @apiDescription Return list stats for a single slp token.
|
||||||
@@ -208,9 +208,13 @@ class PsfSlpIndexer {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flag to toggle tx history of the token.
|
||||||
|
let withTxHistory = false
|
||||||
|
if (req.body.withTxHistory) withTxHistory = true
|
||||||
|
|
||||||
const response = await _this.axios.post(
|
const response = await _this.axios.post(
|
||||||
`${_this.psfSlpIndexerApi}slp/token/`,
|
`${_this.psfSlpIndexerApi}slp/token/`,
|
||||||
{ tokenId }
|
{ tokenId, withTxHistory }
|
||||||
)
|
)
|
||||||
|
|
||||||
res.status(200)
|
res.status(200)
|
||||||
|
|||||||
Reference in New Issue
Block a user