Updated on 2026-08-14
This commit is contained in:
parent
ded9de148c
commit
377f2cd6fd
8 changed files with 406 additions and 1 deletions
|
|
@ -31,6 +31,14 @@ class ResponseCryptoCurrenciesFactory(
|
|||
.toList()
|
||||
}
|
||||
|
||||
fun createCurrencies(tokens: List<UserTokensResponse.Token>, scanResponse: ScanResponse): List<CryptoCurrency> {
|
||||
return tokens
|
||||
.asSequence()
|
||||
.mapNotNull { createCurrency(it, scanResponse) }
|
||||
.distinctBy(CryptoCurrency::id)
|
||||
.toList()
|
||||
}
|
||||
|
||||
fun createCurrency(responseToken: UserTokensResponse.Token, scanResponse: ScanResponse): CryptoCurrency? {
|
||||
var blockchain = Blockchain.fromNetworkId(responseToken.networkId)
|
||||
if (blockchain == null || blockchain == Blockchain.Unknown) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue