Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ import com.synonym.bitkitcore.usdtFormatAmount
import to.bitkit.R
import to.bitkit.env.Env
import to.bitkit.ext.UiDateStyle
import to.bitkit.ext.ellipsisMiddle
import to.bitkit.ext.uiDateStyleFor
import to.bitkit.models.PubkyPublicKeyFormat
import to.bitkit.models.Toast
import to.bitkit.ui.appViewModel
import to.bitkit.ui.components.BodyMSB
import to.bitkit.ui.components.BodyS
Expand All @@ -61,7 +63,9 @@ import to.bitkit.ui.screens.wallets.activity.components.AmountViewContent
import to.bitkit.ui.screens.wallets.activity.components.CircularIcon
import to.bitkit.ui.settingsViewModel
import to.bitkit.ui.shared.UiConstants
import to.bitkit.ui.shared.modifiers.clickableAlpha
import to.bitkit.ui.theme.Colors
import to.bitkit.ui.utils.copyToClipboard
import to.bitkit.ui.utils.uiDateText

@Composable
Expand Down Expand Up @@ -240,8 +244,23 @@ internal val UsdtTransfer.detailTitleResource: Int get() = when {
@Composable
private fun UsdtTechnicalDetails(transfer: UsdtTransfer, hideBalance: Boolean, walletAddress: String) {
transfer.txHash?.let { hash ->
UsdtDetailField(caption = stringResource(R.string.wallet__activity_tx_id)) {
SelectionContainer { BodySSB(hash, style = UsdtDetailStyles.Body) }
val app = appViewModel
val copiedText = stringResource(R.string.common__copied)
UsdtDetailField(
caption = stringResource(R.string.wallet__activity_tx_id),
modifier = Modifier
.clickableAlpha(
onClick = copyToClipboard(hash) {
app?.toast(
type = Toast.ToastType.SUCCESS,
title = copiedText,
description = it.ellipsisMiddle(40),
)
}
)
.testTag("UsdtActivityTxId")
Comment thread
ovitrif marked this conversation as resolved.
) {
BodySSB(hash, style = UsdtDetailStyles.Body)
}
}
val sender = transfer.sender ?: walletAddress.takeIf { !transfer.isIncoming && it.isNotEmpty() }
Expand Down
1 change: 1 addition & 0 deletions changelog.d/next/1633.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tapping the transaction ID in USDT activity details now copies it.
1 change: 1 addition & 0 deletions journeys/usdt-bridge-details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<action>While Cross-Network Deposits is open, inject a confirmed incoming USDT transfer through the isolated fixture. Verify no received sheet interrupts deposit details or refund review. Return to the USDT wallet and verify the received celebration appears once after any active sheet is dismissed. Dismiss it and revisit deposit details, then return to the wallet; verify the same receipt does not appear again.</action>
<action>Open the outgoing delivering USDT activity. Verify the Delivering USDT title, outgoing amount, teal up arrow, yellow Delivering status and actual receiving network.</action>
<action>Tap Details (id "UsdtActivityDetails"). Verify the source transaction, sender and recipient addresses, sender and recipient networks, Orchestra provider and bridge reference. Verify Open Block Explorer (id "UsdtActivityExplorer") and Hide details remain reachable.</action>
<action>Tap the transaction ID (id "UsdtActivityTxId"). Verify from a screenshot that a "Copied To Clipboard" toast appears with the hash, and verify the clipboard holds the full source transaction hash.</action>
<action>For a delayed, failed, refunding, refunded or support-needed bridge fixture, verify Contact Support (id "UsdtContactSupport") and Copy Details (id "UsdtCopyDetails") appear side by side as small 40-point buttons, matching the Request refund / Hide details row. Verify both remain reachable and their labels are not clipped, without submitting either action.</action>
<action>Return to the USDT activity list. Verify Pending uses a yellow hourglass and 16% yellow circle, Failed uses a red x-circle and 16% red circle, and Transferring uses the teal transfer arrows. Sent and Received remain teal.</action>
<action>Open USDT Receive and inject one confirmed incoming USDT transfer through the isolated fixture. Verify Receive is replaced by one received celebration. Dismiss it and verify the same transfer is not celebrated again; a different subsequent transfer must still be shown.</action>
Expand Down
Loading