Updated on 2026-08-14
This commit is contained in:
parent
4f81761d27
commit
92e038b04f
17 changed files with 262 additions and 155 deletions
|
|
@ -20,6 +20,13 @@ class CryptoCurrencyToIconStateConverter : Converter<CryptoCurrencyStatus, Token
|
|||
}
|
||||
}
|
||||
|
||||
fun convert(currency: CryptoCurrency): TokenIconState {
|
||||
return when (currency) {
|
||||
is CryptoCurrency.Coin -> getIconStateForCoin(currency, isUnreachable = false)
|
||||
is CryptoCurrency.Token -> getIconStateForToken(currency, isErrorStatus = false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getIconStateForCoin(coin: CryptoCurrency.Coin, isUnreachable: Boolean): TokenIconState.CoinIcon {
|
||||
return TokenIconState.CoinIcon(
|
||||
url = coin.iconUrl,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue