problem: returns nothing instead of 0 if no unspents

This commit is contained in:
Igor Artamonov
2020-09-26 20:25:50 -04:00
parent d52b8f3381
commit 5dfef09de6
2 changed files with 37 additions and 0 deletions

View File

@@ -140,6 +140,9 @@ class TrackBitcoinAddress(
.map { unspent ->
totalUnspent(address, includeUtxo, unspent)
}
.switchIfEmpty(Mono.just(0).map {
AddressBalance(address, BigInteger.ZERO)
})
.onErrorResume { t ->
log.error("Failed to get unspent", t)
Mono.empty()