Updated on 2026-08-14

This commit is contained in:
Tangem 2024-06-03 18:24:19 +05:00
parent 9965745779
commit 6e0ca6f09d
2 changed files with 5 additions and 1 deletions

View file

@ -1,5 +1,6 @@
package com.tangem.features.send.impl.presentation.state.recipient
import com.tangem.common.extensions.isZero
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.stringReference
import com.tangem.core.ui.extensions.wrappedList
@ -39,7 +40,8 @@ internal class SendRecipientHistoryListConverter(
} else {
item.sourceType is TxHistoryItem.SourceType.Single
}
isTransfer && isSingleAddress && isNotContract
val notZero = !item.amount.isZero()
isTransfer && isSingleAddress && isNotContract && item.isOutgoing && notZero
}
.take(RECENT_LIST_SIZE)
.mapIndexed { index, tx ->

View file

@ -453,6 +453,7 @@ internal class SendViewModel @Inject constructor(
val txHistoryList = getFixedTxHistoryItemsUseCase.getSync(
userWalletId = userWalletId,
currency = cryptoCurrency,
pageSize = RECENT_TX_SIZE,
).getOrElse { emptyList() }
uiState = stateFactory.onLoadedHistoryList(txHistory = txHistoryList)
}
@ -968,6 +969,7 @@ internal class SendViewModel @Inject constructor(
private companion object {
const val CHECK_FEE_UPDATE_DELAY = 60_000L
const val BALANCE_UPDATE_DELAY = 11_000L
const val RECENT_TX_SIZE = 100
const val RU_LOCALE = "ru"
const val EN_LOCALE = "en"