fix(slp): Removing the data2 path as it never worked well

This commit is contained in:
Chris Troutner
2025-11-16 07:38:35 -08:00
parent f59ca87f1e
commit c338fd38ea
6 changed files with 1 additions and 114 deletions
@@ -32,7 +32,6 @@ class SlpRESTController {
this.getTxid = this.getTxid.bind(this)
this.getTokenStats = this.getTokenStats.bind(this)
this.getTokenData = this.getTokenData.bind(this)
this.getTokenData2 = this.getTokenData2.bind(this)
this.handleError = this.handleError.bind(this)
}
@@ -206,32 +205,6 @@ class SlpRESTController {
}
}
/**
* @api {post} /v6/slp/token/data2 Get expanded token data
* @apiName GetTokenData2
* @apiGroup SLP
* @apiDescription Get expanded data for the token, including icons.
*/
async getTokenData2 (req, res) {
try {
const tokenId = req.body.tokenId
if (!tokenId || tokenId === '') {
return res.status(400).json({
success: false,
error: 'tokenId can not be empty'
})
}
const updateCache = req.body.updateCache
const result = await this.slpUseCases.getTokenData2({ tokenId, updateCache })
return res.status(200).json(result)
} catch (err) {
return this.handleError(err, res)
}
}
handleError (err, res) {
wlogger.error('Error in SlpRESTController:', err)
-1
View File
@@ -47,7 +47,6 @@ class SlpRouter {
this.router.post('/txid', this.slpController.getTxid)
this.router.post('/token', this.slpController.getTokenStats)
this.router.post('/token/data', this.slpController.getTokenData)
this.router.post('/token/data2', this.slpController.getTokenData2)
app.use(this.baseUrl, this.router)
}
-12
View File
@@ -146,18 +146,6 @@ class SlpUseCases {
}
}
async getTokenData2 ({ tokenId, updateCache }) {
try {
await this._ensureInitialized()
const tokenData = await this.slpTokenMedia.getIcon({ tokenId, updateCache })
return tokenData
} catch (err) {
wlogger.error('Error in SlpUseCases.getTokenData2()', err)
throw err
}
}
async getMutableCid ({ tokenStats }) {
// Validate input - this should throw, not be caught
if (!tokenStats || !tokenStats.documentHash) {