feat: add tx hash retrieval in wallet plugin
This commit is contained in:
parent
3b01820242
commit
708dea736d
7 changed files with 56 additions and 6 deletions
|
|
@ -235,6 +235,14 @@ 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))
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
balance,
|
||||
sendCoins,
|
||||
|
|
@ -242,5 +250,6 @@ module.exports = {
|
|||
getStatus,
|
||||
newFunding,
|
||||
cryptoNetwork,
|
||||
checkBlockchainStatus
|
||||
checkBlockchainStatus,
|
||||
getTxHashesByAddress
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue