Skip to content

Commit

Permalink
fix: only set tx icon in updateIcon (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
Syn-McJ authored Oct 18, 2023
1 parent e7e65fe commit c024ad8
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ class TransactionResultViewBinder(
binding.openTaxCategoryCard.isVisible = false
binding.dashAmount.setStrikeThru(true)
binding.fiatValue.setStrikeThru(true)
binding.checkIcon.setImageResource(R.drawable.ic_transaction_failed)
binding.transactionTitle.text = context.getText(R.string.transaction_failed_details)

var rescanText = ""
Expand All @@ -267,26 +266,16 @@ class TransactionResultViewBinder(
}
} else {
if (tx.getValue(wallet).signum() < 0) {
binding.checkIcon.setImageResource(
if (tx.isEntirelySelf(wallet)) {
R.drawable.ic_internal
} else {
R.drawable.ic_transaction_sent
}
)

binding.transactionTitle.setTextColor(ContextCompat.getColor(context, R.color.dash_blue))
binding.transactionTitle.text = context.getText(R.string.transaction_details_amount_sent)
binding.transactionAmountSignal.text = "-"
binding.transactionAmountSignal.isVisible = true
} else {
binding.checkIcon.setImageResource(R.drawable.ic_transaction_received)
binding.transactionTitle.setTextColor(ContextCompat.getColor(context, R.color.system_green))
binding.transactionTitle.text = context.getText(R.string.transaction_details_amount_received)
binding.transactionAmountSignal.isVisible = true
binding.transactionAmountSignal.text = "+"
}
binding.checkIcon.isVisible = true
binding.feeContainer.isVisible = isFeeAvailable(tx.fee)
}
}
Expand Down

0 comments on commit c024ad8

Please sign in to comment.