Updated on 2026-08-14

This commit is contained in:
Tangem 2024-08-29 18:44:22 +05:00
parent 473a936863
commit df938519a2
13 changed files with 155 additions and 32 deletions

View file

@ -153,15 +153,7 @@ internal class DefaultCurrenciesRepository(
val token = userTokensResponseFactory.createResponseToken(currency)
storeAndPushTokens(
userWalletId = userWalletId,
response = savedCurrencies.copy(
tokens = savedCurrencies.tokens.filterNot {
// it's better to compare by fields, to support renaming and etc
it.contractAddress == token.contractAddress &&
it.networkId == token.networkId &&
it.derivationPath == token.derivationPath &&
it.decimals == token.decimals
},
),
response = savedCurrencies.copy(tokens = savedCurrencies.tokens.filterNot { it == token }),
)
}