fix: remove coins not supported by ciphertrace

This commit is contained in:
José Oliveira 2022-07-20 11:08:57 +01:00
parent 708dea736d
commit e798be94ae
3 changed files with 3 additions and 12 deletions

View file

@ -126,10 +126,7 @@ function checkBlockchainStatus (cryptoCode) {
}
function getTxHashesByAddress (cryptoCode, address) {
checkCryptoCode(cryptoCode)
.then(() => fetch('listreceivedbyaddress', [0, true, true, true, address]))
.then(txsByAddress => Promise.all(_.forEach(id => fetch('getrawtransaction', [id]), _.head(txsByAddress).txids)))
.then(_.map(({ hash }) => hash))
throw new Error(`Transactions hash retrieval is not implemented for this coin!`)
}
module.exports = {

View file

@ -236,11 +236,7 @@ function checkBlockchainStatus (cryptoCode) {
}
function getTxHashesByAddress (cryptoCode, address) {
checkCryptoCode(cryptoCode)
.then(() => refreshWallet())
.then(() => fetch('get_address_index', { address: address }))
.then(addressRes => fetch('get_transfers', { in: true, pool: true, pending: true, account_index: addressRes.index.major, address_indices: [addressRes.index.minor] }))
.then(_.map(({ txid }) => txid))
throw new Error(`Transactions hash retrieval is not implemented for this coin!`)
}
module.exports = {

View file

@ -152,9 +152,7 @@ function checkBlockchainStatus (cryptoCode) {
}
function getTxHashesByAddress (cryptoCode, address) {
checkCryptoCode(cryptoCode)
.then(() => fetch('getaddresstxids', [address]))
.then(_.mapKeys(() => 'txid'))
throw new Error(`Transactions hash retrieval is not implemented for this coin!`)
}
module.exports = {