Browse Source

code cleaning

use-env-var-docker
kenshin-samourai 4 years ago
parent
commit
5c5b95061a
  1. 37
      accounts/support-rest-api.js

37
accounts/support-rest-api.js

@ -120,32 +120,9 @@ class SupportRestApi {
*/ */
_formatAddressInfoResult(info) { _formatAddressInfoResult(info) {
const res = info.toPojoExtended() const res = info.toPojoExtended()
/*res._endpoints = []
if (info.tracked) {
res._endpoints.push({
task: 'Rescan this address from remote sources',
url: `/${keys.prefixes.support}/address/${info.address}/rescan`
})
}
if (info.xpub != null) {
res._endpoints.push({
task: 'Get information about the HD account that owns this address',
url: `/${keys.prefixes.support}/xpub/${info.xpub}/info`
})
res._endpoints.push({
task: 'Rescan the whole HD account that owns this address',
url: `/${keys.prefixes.support}/xpub/${info.xpub}/rescan`
})
}*/
return JSON.stringify(res, null, 2) return JSON.stringify(res, null, 2)
} }
/** /**
* Rescan the blockchain for a given address * Rescan the blockchain for a given address
* @param {object} req - http request object * @param {object} req - http request object
@ -162,10 +139,6 @@ class SupportRestApi {
const ret = { const ret = {
status: 'Rescan complete', status: 'Rescan complete',
/*_endpoints: [{
task: 'Get updated information about this address',
url: `/${keys.prefixes.support}/address/${address}/info`
}]*/
} }
await addrService.rescan(address) await addrService.rescan(address)
@ -224,12 +197,6 @@ class SupportRestApi {
*/ */
_formatXpubInfoResult(info) { _formatXpubInfoResult(info) {
const res = info.toPojoExtended() const res = info.toPojoExtended()
/*res._endpoints = [{
task: 'Rescan the whole HD account from remote sources',
url: `/${keys.prefixes.support}/xpub/${info.xpub}/rescan`
}]*/
return JSON.stringify(res, null, 2) return JSON.stringify(res, null, 2)
} }
@ -249,10 +216,6 @@ class SupportRestApi {
const ret = { const ret = {
status: 'Rescan complete', status: 'Rescan complete',
/*_endpoints: [{
task: 'Get updated information about this HD account',
url: `/${keys.prefixes.support}/xpub/${xpub}/info`
}]*/
} }
const gapLimit = req.query.gap != null ? parseInt(req.query.gap) : 0 const gapLimit = req.query.gap != null ? parseInt(req.query.gap) : 0

Loading…
Cancel
Save