Updated on 2026-08-14
This commit is contained in:
commit
096c8e2f23
4 changed files with 20 additions and 16 deletions
|
|
@ -71,8 +71,16 @@ dependencies {
|
|||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'
|
||||
|
||||
implementation 'com.tangem:blockchain:1.96.0'
|
||||
implementation 'com.tangem:core:1.68.0'
|
||||
implementation 'com.tangem:sdk:1.68.0'
|
||||
implementation('com.tangem:core') {
|
||||
version {
|
||||
strictly '1.73.0'
|
||||
}
|
||||
}
|
||||
implementation('com.tangem:sdk:') {
|
||||
version {
|
||||
strictly '1.73.0'
|
||||
}
|
||||
}
|
||||
|
||||
//lifecycle
|
||||
implementation "androidx.lifecycle:lifecycle-runtime:2.2.0"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.tangem.tap.features.send.redux
|
|||
|
||||
import com.tangem.Message
|
||||
import com.tangem.blockchain.common.Amount
|
||||
import com.tangem.tangem_sdk_new.ui.animation.VoidCallback
|
||||
import com.tangem.tap.common.redux.ErrorAction
|
||||
import com.tangem.tap.common.redux.ToastNotificationAction
|
||||
import com.tangem.tap.domain.TapError
|
||||
|
|
@ -118,8 +117,8 @@ sealed class SendAction : SendScreenAction {
|
|||
|
||||
sealed class Dialog : SendAction() {
|
||||
data class ShowTezosWarningDialog(
|
||||
val reduceCallback: VoidCallback,
|
||||
val sendAllCallback: VoidCallback,
|
||||
val reduceCallback: () -> Unit,
|
||||
val sendAllCallback: () -> Unit,
|
||||
val reduceAmount: BigDecimal,
|
||||
) : Dialog()
|
||||
object Hide : Dialog()
|
||||
|
|
|
|||
|
|
@ -11,20 +11,20 @@ data class PendingTransaction(
|
|||
val type: PendingTransactionType
|
||||
)
|
||||
|
||||
enum class PendingTransactionType { Incoming, Outgoing, Unknown }
|
||||
enum class PendingTransactionType { Incoming, Outgoing }
|
||||
|
||||
fun TransactionData.toPendingTransaction(walletAddress: String): PendingTransaction? {
|
||||
if (this.status == TransactionStatus.Confirmed) return null
|
||||
|
||||
val type: PendingTransactionType = when {
|
||||
// this.sourceAddress == walletAddress -> {
|
||||
// PendingTransactionType.Outgoing
|
||||
// }
|
||||
// this.destinationAddress == walletAddress -> {
|
||||
// PendingTransactionType.Incoming
|
||||
// }
|
||||
this.sourceAddress == walletAddress -> {
|
||||
PendingTransactionType.Outgoing
|
||||
}
|
||||
this.destinationAddress == walletAddress -> {
|
||||
PendingTransactionType.Incoming
|
||||
}
|
||||
else -> {
|
||||
PendingTransactionType.Unknown
|
||||
return null
|
||||
}
|
||||
}
|
||||
val address = if (this.sourceAddress == walletAddress) {
|
||||
|
|
|
|||
|
|
@ -43,17 +43,14 @@ class PendingTransactionsAdapter
|
|||
val transactionDescriptionRes = when (transaction.type) {
|
||||
PendingTransactionType.Incoming -> R.string.wallet_pending_tx_receiving
|
||||
PendingTransactionType.Outgoing -> R.string.wallet_pending_tx_sending
|
||||
PendingTransactionType.Unknown -> return
|
||||
}
|
||||
val transactionAddressRes = when (transaction.type) {
|
||||
PendingTransactionType.Incoming -> R.string.wallet_pending_tx_receiving_address_format
|
||||
PendingTransactionType.Outgoing -> R.string.wallet_pending_tx_sending_address_format
|
||||
PendingTransactionType.Unknown -> return
|
||||
}
|
||||
val image = when (transaction.type) {
|
||||
PendingTransactionType.Incoming -> R.drawable.ic_arrow_left
|
||||
PendingTransactionType.Outgoing -> R.drawable.ic_arrow_right_20
|
||||
PendingTransactionType.Unknown -> return
|
||||
}
|
||||
view.tv_pending_transaction.text = view.context.getString(transactionDescriptionRes)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue