Updated on 2026-08-14
This commit is contained in:
parent
724a1fe19b
commit
4ee802212b
11 changed files with 33 additions and 39 deletions
|
|
@ -420,7 +420,6 @@ internal object WalletPreviewData {
|
|||
TxHistoryState.TxHistoryItemState.Transaction(
|
||||
TransactionState.Content(
|
||||
txHash = UUID.randomUUID().toString(),
|
||||
address = TextReference.Str("33BddS...ga2B"),
|
||||
amount = "-0.500913 BTC",
|
||||
timestamp = "8:41",
|
||||
status = TransactionState.Content.Status.Unconfirmed,
|
||||
|
|
@ -435,7 +434,6 @@ internal object WalletPreviewData {
|
|||
TxHistoryState.TxHistoryItemState.Transaction(
|
||||
TransactionState.Content(
|
||||
txHash = UUID.randomUUID().toString(),
|
||||
address = TextReference.Str("33BddS...ga2B"),
|
||||
amount = "-0.500913 BTC",
|
||||
timestamp = "8:41",
|
||||
status = TransactionState.Content.Status.Confirmed,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ internal class WalletTxHistoryTransactionStateConverter(
|
|||
private fun createTransactionStateItem(item: TxHistoryItem): TransactionState {
|
||||
return TransactionState.Content(
|
||||
txHash = item.txHash,
|
||||
address = stringReference("mocked address"),
|
||||
amount = item.getAmount(),
|
||||
timestamp = item.getRawTimestamp(),
|
||||
status = item.status.tiUiStatus(),
|
||||
|
|
@ -101,7 +100,10 @@ internal class WalletTxHistoryTransactionStateConverter(
|
|||
}
|
||||
|
||||
private fun TxHistoryItem.getAmount(): String {
|
||||
val prefix = if (isOutgoing) "-" else "+"
|
||||
val prefix = when (status) {
|
||||
TxHistoryItem.TransactionStatus.Failed -> ""
|
||||
else -> if (isOutgoing) "-" else "+"
|
||||
}
|
||||
return prefix + amount.toFormattedCurrencyString(currency = symbol, decimals = decimals)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue