Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-10 10:15:44 +04:00
parent bb4afdec80
commit 16b33742ca
9 changed files with 686 additions and 12 deletions

View file

@ -0,0 +1,15 @@
package com.tangem.data.common.account
import com.tangem.domain.models.wallet.UserWalletId
/**
* Component for fetching wallet accounts
*
[REDACTED_AUTHOR]
*/
interface WalletAccountsFetcher {
/** Fetch wallet accounts by [userWalletId] */
@Throws
suspend fun fetch(userWalletId: UserWalletId)
}

View file

@ -0,0 +1,29 @@
package com.tangem.data.common.account
import com.tangem.datasource.api.tangemTech.models.account.GetWalletAccountsResponse
import com.tangem.datasource.api.tangemTech.models.account.SaveWalletAccountsResponse
import com.tangem.datasource.api.tangemTech.models.account.WalletAccountDTO
import com.tangem.domain.models.wallet.UserWalletId
/**
* Saver for wallet accounts
*
[REDACTED_AUTHOR]
*/
interface WalletAccountsSaver {
/** Push and store wallet accounts [response] by [userWalletId] */
@Throws
suspend fun pushAndStore(userWalletId: UserWalletId, response: GetWalletAccountsResponse)
/** Store wallet accounts [response] by [userWalletId] */
suspend fun store(userWalletId: UserWalletId, response: GetWalletAccountsResponse)
/** Push wallet accounts [body] by [userWalletId] */
@Throws
suspend fun push(userWalletId: UserWalletId, body: SaveWalletAccountsResponse)
/** Push wallet accounts [accounts] by [userWalletId] */
@Throws
suspend fun push(userWalletId: UserWalletId, accounts: List<WalletAccountDTO>)
}