Updated on 2026-08-14

This commit is contained in:
Tangem 2020-01-28 11:46:57 +03:00
parent 90d7a293ab
commit 819fbe0d44
2 changed files with 4 additions and 3 deletions

View file

@ -90,7 +90,8 @@ class BitcoinNetworkManager(private val isTestNet: Boolean) : BitcoinProvider {
data class BitcoinAddressResponse(
val balance: Long,
val hasUnconfirmed: Boolean,
val unspentTransactions: List<UnspentTransaction>)
val unspentTransactions: List<UnspentTransaction>
)
data class BitcoinFee(
val minimalPerKb: BigDecimal,

View file

@ -23,7 +23,7 @@ class BlockchainInfoProvider(
val addressData = addressDeferred.await()
val unspents = unspentsDeferred.await()
val unconfinedTransactions = addressData.transactions?.find { it.blockHeight == 0L } != null
val unconfirmedTransactions = addressData.transactions?.find { it.blockHeight == 0L } != null
val bitcoinUnspents = unspents.unspentOutputs.map {
UnspentTransaction(
@ -36,7 +36,7 @@ class BlockchainInfoProvider(
Result.Success(
BitcoinAddressResponse(
addressData.finalBalance
?: 0L, unconfinedTransactions, bitcoinUnspents))
?: 0L, unconfirmedTransactions, bitcoinUnspents))
}
} catch (exception: Exception) {
Result.Failure(exception)