Skip to content

feat: Log the original transaction status#566

Merged
dan437 merged 1 commit intomainfrom
original-transaction-status
Feb 10, 2026
Merged

feat: Log the original transaction status#566
dan437 merged 1 commit intomainfrom
original-transaction-status

Conversation

@dan437
Copy link
Collaborator

@dan437 dan437 commented Feb 10, 2026

Description

The transaction API now returns a new originalTransactionStatus field in the batch status response. This PR:

  • Adds OriginalTransactionStatus enum with all possible values (VALIDATED, REVERTED, CANCELLED, FAILED_WOULD_REVERT, etc.)
  • Adds originalTransactionStatus to the SmartTransactionsStatus type
  • Includes stx_original_transaction_status in getSmartTransactionMetricsProperties, so it's tracked in "STX Status Updated" and "STX Confirmed" events
  • Includes originalTransactionStatus in the error message set by markRegularTransactionsAsFailed, so it reliably appears in the "Transaction Finalized" event's error field for failed/cancelled smart transactions

Changes

  • src/types.ts — new OriginalTransactionStatus enum, typed field on SmartTransactionsStatus
  • src/utils.ts — added to metrics properties and failure error message
  • src/index.ts — exported OriginalTransactionStatus
  • src/utils.test.ts — tests for the new behavior

Note

Low Risk
Adds a new optional status field and only uses it for analytics properties and error-message enrichment; core transaction flow is unchanged aside from message formatting.

Overview
Adds a new OriginalTransactionStatus enum and threads an optional originalTransactionStatus field through SmartTransactionsStatus (and exports it publicly).

Includes this value in getSmartTransactionMetricsProperties as stx_original_transaction_status and appends it to the error message generated by markRegularTransactionsAsFailed when present, with tests covering both behaviors.

Written by Cursor Bugbot for commit c89269c. This will update automatically on new commits. Configure here.

Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
@dan437 dan437 requested a review from a team as a code owner February 10, 2026 13:15
@dan437 dan437 merged commit da1f81e into main Feb 10, 2026
18 checks passed
@dan437 dan437 deleted the original-transaction-status branch February 10, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants