Skip to content

Commit

Permalink
Catch error
Browse files Browse the repository at this point in the history
  • Loading branch information
SeniorZhai committed Jan 24, 2025
1 parent 95142d1 commit e351828
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Web3TokenHeader : ConstraintLayout {
} catch (ignored: Exception) {
token.balance
}
_binding.value.text = "${Fiats.getSymbol()}${(BigDecimal(token.price).multiply(BigDecimal(token.balance)).multiply(BigDecimal(Fiats.getRate())).numberFormat2())}"
_binding.value.text = runCatching { "${Fiats.getSymbol()}${(BigDecimal(token.price).multiply(BigDecimal(token.balance)).multiply(BigDecimal(Fiats.getRate())).numberFormat2())}" }.getOrDefault("N/A")
_binding.symbol.text = token.symbol
_binding.stake.root.isVisible = token.isSolToken()
}
Expand Down

0 comments on commit e351828

Please sign in to comment.