feat: add tx hash retrieval in wallet plugin

This commit is contained in:
José Oliveira 2022-07-19 20:14:40 +01:00
parent 3b01820242
commit 708dea736d
7 changed files with 56 additions and 6 deletions

View file

@ -151,11 +151,18 @@ function checkBlockchainStatus (cryptoCode) {
.then(res => !!res['initial_block_download_complete'] ? 'ready' : 'syncing')
}
function getTxHashesByAddress (cryptoCode, address) {
checkCryptoCode(cryptoCode)
.then(() => fetch('getaddresstxids', [address]))
.then(_.mapKeys(() => 'txid'))
}
module.exports = {
balance,
sendCoins,
newAddress,
getStatus,
newFunding,
checkBlockchainStatus
checkBlockchainStatus,
getTxHashesByAddress
}