Updated on 2026-08-14

This commit is contained in:
Tangem 2026-02-11 17:48:20 +05:00
parent 6ed1946ac3
commit aac48015b3
88 changed files with 335 additions and 239 deletions

View file

@ -47,8 +47,8 @@ internal class DefaultSwapTransactionRepository(
userWalletId: UserWalletId,
fromCryptoCurrency: CryptoCurrency,
toCryptoCurrency: CryptoCurrency,
fromAccount: Account.CryptoPortfolio?,
toAccount: Account.CryptoPortfolio?,
fromAccount: Account?,
toAccount: Account?,
transaction: SavedSwapTransactionModel,
) {
transaction.status?.let { status ->
@ -248,8 +248,8 @@ internal class DefaultSwapTransactionRepository(
userWalletId: UserWalletId,
fromCryptoCurrency: CryptoCurrency,
toCryptoCurrency: CryptoCurrency,
fromAccount: Account.CryptoPortfolio?,
toAccount: Account.CryptoPortfolio?,
fromAccount: Account?,
toAccount: Account?,
transactions: List<SavedSwapTransactionModel>,
): List<SavedSwapTransactionListModelInner> {
return addOrReplace(

View file

@ -120,8 +120,8 @@ internal class SavedSwapTransactionListConverter(
userWalletId: UserWalletId,
fromCryptoCurrency: CryptoCurrency,
toCryptoCurrency: CryptoCurrency,
fromAccount: Account.CryptoPortfolio?,
toAccount: Account.CryptoPortfolio?,
fromAccount: Account?,
toAccount: Account?,
tokenTransactions: List<SavedSwapTransactionModel>,
) = SavedSwapTransactionListModelInner(
userWalletId = userWalletId.stringValue,
@ -161,10 +161,7 @@ internal class SavedSwapTransactionListConverter(
}
}
private fun findAccountByDerivationIndex(
accountList: AccountList?,
derivationIndex: DerivationIndex?,
): Account.CryptoPortfolio? {
private fun findAccountByDerivationIndex(accountList: AccountList?, derivationIndex: DerivationIndex?): Account? {
return accountList?.accounts?.asSequence()?.filterIsInstance<Account.CryptoPortfolio>()
?.firstOrNull { it.derivationIndex == derivationIndex }
}