Skip to content

Commit

Permalink
ignore assets with null price
Browse files Browse the repository at this point in the history
  • Loading branch information
antonis-bc committed Dec 8, 2022
1 parent 5102684 commit a0bc3db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import kotlinx.coroutines.flow.combine
import piuk.blockchain.android.ui.dashboard.WalletModeBalanceCache

class WalletModeBalanceRepository(
private var walletModeService: WalletModeService,
private val walletModeService: WalletModeService,
private val balanceStore: WalletModeBalanceCache,
private val currencyPrefs: CurrencyPrefs,
) : WalletModeBalanceService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ internal class UnifiedBalancesRepository(
else it.currency == wallet.currency.networkTicker && it.account.index == wallet.index &&
it.account.name == wallet.label
}.mapNotNull {
if (it.price == null) return@mapNotNull null
val cc = assetCatalogue.fromNetworkTicker(it.currency)
NetworkBalance(
currency = cc ?: return@mapNotNull null,
Expand Down

0 comments on commit a0bc3db

Please sign in to comment.