Updated on 2026-08-14
This commit is contained in:
parent
473a936863
commit
df938519a2
13 changed files with 155 additions and 32 deletions
|
|
@ -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 }),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue