Updated on 2026-08-14
This commit is contained in:
parent
9c8bfd4139
commit
0896f80f53
30 changed files with 483 additions and 263 deletions
|
|
@ -162,8 +162,12 @@ internal class SavedSwapTransactionListConverter(
|
|||
}
|
||||
|
||||
private fun findAccountByDerivationIndex(accountList: AccountList?, derivationIndex: DerivationIndex?): Account? {
|
||||
return accountList?.accounts?.asSequence()?.filterIsInstance<Account.CryptoPortfolio>()
|
||||
?.firstOrNull { it.derivationIndex == derivationIndex }
|
||||
val accounts = accountList?.accounts ?: return null
|
||||
|
||||
return accounts.asSequence()
|
||||
.filterIsInstance<Account.CryptoPortfolio>()
|
||||
.firstOrNull { it.derivationIndex == derivationIndex }
|
||||
?: accounts.firstOrNull { it is Account.Payment }.takeIf { derivationIndex == null }
|
||||
}
|
||||
|
||||
private fun UserTokensResponse.Token.getDerivationIndex(): DerivationIndex? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue