fix: promise all array values and monero get_transfers arg
This commit is contained in:
parent
baf95b1e7c
commit
bc1925a14c
5 changed files with 5 additions and 6 deletions
|
|
@ -132,7 +132,7 @@ function checkBlockchainStatus (cryptoCode) {
|
|||
function getTxHashesByAddress (cryptoCode, address) {
|
||||
checkCryptoCode(cryptoCode)
|
||||
.then(() => fetch('listreceivedbyaddress', [0, true, true, address]))
|
||||
.then(txsByAddress => Promise.all(_.forEach(id => fetch('getrawtransaction', [id]), _.head(txsByAddress).txids)))
|
||||
.then(txsByAddress => Promise.all(_.map(id => fetch('getrawtransaction', [id]), _.flatMap(it => it.txids, txsByAddress))))
|
||||
.then(_.map(({ hash }) => hash))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue