Updated on 2026-08-14

This commit is contained in:
Tangem 2025-12-16 19:12:28 +07:00
parent a02b13ae6a
commit 0ccfceba04

View file

@ -70,9 +70,16 @@ class ApplyAccountListSortingUseCase(
return@eitherOn
}
accountsCRUDRepository.saveAccounts(accountList = updatedAccountList)
applySorting(accountList = updatedAccountList)
}
private suspend fun applySorting(accountList: AccountList) {
catch(
block = { accountsCRUDRepository.saveAccounts(accountList) },
catch = { accountsCRUDRepository.saveAccountsLocally(accountList) },
)
}
private suspend fun Raise<Error>.getAccountList(userWalletId: UserWalletId): AccountList {
return catch(
block = { accountsCRUDRepository.getAccountListSync(userWalletId = userWalletId) },