Updated on 2026-08-14
This commit is contained in:
parent
038cfc6d85
commit
b5ea13145c
1 changed files with 4 additions and 7 deletions
|
|
@ -87,10 +87,7 @@ class ManageCryptoCurrenciesUseCase(
|
|||
account = accountStatus.account.copy(cryptoCurrencies = modifiedCurrencyList.total.toSet()),
|
||||
)
|
||||
|
||||
val isDerivingFailed = derivePublicKeys(
|
||||
userWalletId = userWalletId,
|
||||
currencies = modifiedCurrencyList.added,
|
||||
).isLeft()
|
||||
derivePublicKeys(userWalletId = userWalletId, currencies = modifiedCurrencyList.added)
|
||||
|
||||
parallelUpdatingScope.launch {
|
||||
/*
|
||||
|
|
@ -99,12 +96,12 @@ class ManageCryptoCurrenciesUseCase(
|
|||
*/
|
||||
val isOnlyRemoval = modifiedCurrencyList.added.isEmpty() && modifiedCurrencyList.removed.isNotEmpty()
|
||||
|
||||
if (isDerivingFailed || isOnlyRemoval) {
|
||||
if (isOnlyRemoval) {
|
||||
launch { accountsCRUDRepository.syncTokens(userWalletId) }
|
||||
clearMetadata(userWalletId = userWalletId, currencies = modifiedCurrencyList.removed)
|
||||
return@launch
|
||||
}
|
||||
|
||||
if (isDerivingFailed) return@launch
|
||||
|
||||
cryptoCurrencyBalanceFetcher(userWalletId = userWalletId, currencies = modifiedCurrencyList.added)
|
||||
refreshExpress(userWalletId = userWalletId, currencies = modifiedCurrencyList.total)
|
||||
clearMetadata(userWalletId = userWalletId, currencies = modifiedCurrencyList.removed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue