Skip to content

Commit

Permalink
Adjust texts, add Read more event
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Apr 8, 2024
1 parent 5a44059 commit 92e613b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/tx-flow/flows/ReplaceTx/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ const ReplaceTxMenu = ({

<Typography variant="body2" mt={-1} mb={1}>
You can replace or reject this transaction on-chain. It requires gas fees and your signature.{' '}
<ExternalLink href="https://help.safe.global/en/articles/40836-why-do-i-need-to-pay-for-cancelling-a-transaction">
Read more
</ExternalLink>{' '}
<Track {...REJECT_TX_EVENTS.READ_MORE}>
<ExternalLink href="https://help.safe.global/en/articles/40836-why-do-i-need-to-pay-for-cancelling-a-transaction">
Read more
</ExternalLink>
</Track>
</Typography>

<Box display="flex" flexDirection="column" gap={2}>
Expand All @@ -81,7 +83,7 @@ const ReplaceTxMenu = ({
icon={CachedIcon}
onClick={() => setTxFlow(<TokenTransferFlow txNonce={txNonce} />)}
title="Replace with another transaction"
description="Overwrite by a new transaction with the same nonce"
description="Propose a new transaction with the same nonce to overwrite this one"
chip="Recommended"
/>
</Track>
Expand All @@ -99,7 +101,7 @@ const ReplaceTxMenu = ({
onClick={() => setTxFlow(<RejectTx txNonce={txNonce} />)}
disabled={!canCancel}
title="Reject transaction"
description="Create a cancellation transaction with the same nonce to avoid security risks"
description="Propose an on-chain cancellation transaction with the same nonce"
chip={canDelete ? 'Recommended' : undefined}
/>
</Track>
Expand All @@ -122,7 +124,7 @@ const ReplaceTxMenu = ({
iconColor="error"
onClick={() => setIsDeleting(true)}
title="Delete from the queue"
description="Remove this transaction from the queue permanently"
description="Remove this transaction from the off-chain queue"
/>
</Track>

Expand Down
5 changes: 5 additions & 0 deletions src/services/analytics/events/reject-tx.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const category = 'reject-tx'

export const REJECT_TX_EVENTS = {
READ_MORE: {
action: 'Reject tx read more',
category,
},

REPLACE_TX_BUTTON: {
action: 'Replace tx button',
category,
Expand Down

0 comments on commit 92e613b

Please sign in to comment.