Skip to content

Commit

Permalink
Minor UI fixes regarding the mined unconfirmed/confirmed difference. …
Browse files Browse the repository at this point in the history
…A minor fix in the wallet service regarding base node validation sequence.
  • Loading branch information
kukabi committed Feb 24, 2021
1 parent 4c2f717 commit cd5cd81
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ internal class WalletService : Service(), FFIWalletListener, LifecycleObserver {
type.name + " Validation [$responseId] complete. Result: $result."
+ " Request id [${currentStatus.first}] mismatch. Ignoring."
)
return
}
Logger.d(type.name + " Validation [$responseId] complete. Result: $result.")
baseNodeValidationStatusMap[type] = Pair(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import com.tari.android.wallet.R.string.*
import com.tari.android.wallet.databinding.HomeTxListItemBinding
import com.tari.android.wallet.extension.applyFontStyle
import com.tari.android.wallet.model.*
import com.tari.android.wallet.model.TxStatus.MINED_CONFIRMED
import com.tari.android.wallet.model.TxStatus.MINED_UNCONFIRMED
import com.tari.android.wallet.model.TxStatus.PENDING
import com.tari.android.wallet.ui.component.CustomFont
import com.tari.android.wallet.ui.component.EmojiIdSummaryViewController
Expand Down Expand Up @@ -209,6 +209,14 @@ class TxViewHolder(
color(R.color.home_tx_value_pending),
drawable(R.drawable.home_tx_value_pending_bg)!!
)
tx is CompletedTx && tx.status == MINED_UNCONFIRMED -> Triple(
when (tx.direction) {
Tx.Direction.OUTBOUND -> "-$amount"
Tx.Direction.INBOUND -> "+$amount"
},
color(R.color.home_tx_value_pending),
drawable(R.drawable.home_tx_value_pending_bg)!!
)
tx.direction == Tx.Direction.INBOUND -> Triple(
"+$amount",
color(R.color.home_tx_value_positive),
Expand Down Expand Up @@ -265,7 +273,7 @@ class TxViewHolder(
)
is CompletedTx -> {
when (tx.status) {
MINED_CONFIRMED -> showStatusTextView(tx_detail_completing_final_processing)
MINED_UNCONFIRMED -> showStatusTextView(tx_detail_completing_final_processing)
else -> ui.statusTextView.gone()
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
ext.kotlin_version = '1.4.21'

// build & version
ext.buildNumber = 150
ext.buildNumber = 151
ext.versionNumber = "0.6.0"

// JNI libs
Expand Down

0 comments on commit cd5cd81

Please sign in to comment.