Skip to content

Conversation

@lcovar
Copy link
Contributor

@lcovar lcovar commented Feb 11, 2026

… undefined

The base class getter previously returned string via an unsafe cast, but _id is string | undefined. This makes the type honest and updates all coin implementations to return undefined instead of sentinel strings like 'UNAVAILABLE' when no transaction ID is available.

Changes:

  • BaseTransaction.id now returns string | undefined
  • ITransactionExplanation.id now accepts string | undefined
  • 8 coin get id() overrides updated to return undefined instead of sentinels
  • Interface types updated in ada, canton, icp, vet
  • Test files updated with non-null assertions where ID is known to be set

Ticket: BTC-2926

@lcovar lcovar force-pushed the BTC-0-base-transaction-id-fix branch 3 times, most recently from c303187 to 462e65a Compare February 11, 2026 22:40
… undefined

Update BaseTransaction.id getter return type from string to
string | undefined to accurately reflect that transaction IDs
may not be available before signing/serialization.

Propagate the type change to all downstream coin modules:
- sdk-coin-ada: update explainTransaction return type and test assertions
- sdk-coin-apt: update TxData.id type
- sdk-coin-dot: update test assertions
- sdk-coin-flrp: update test assertions
- sdk-coin-near: update test assertions
- sdk-coin-sui: update Transaction<T>.id getter return type
- sdk-coin-ton: update TxData.id and local ITransactionExplanation.id types
- sdk-coin-vet: update VetTransactionData.id type and test assertions

BTC-0

TICKET: BTC-0
@lcovar lcovar force-pushed the BTC-0-base-transaction-id-fix branch from 462e65a to ce05dcf Compare February 11, 2026 22:54
@lcovar lcovar marked this pull request as ready for review February 12, 2026 06:42
@lcovar lcovar requested review from a team as code owners February 12, 2026 06:42
Copy link
Contributor

@dpkjnr dpkjnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a breaking change, please add a breaking change footer in the commit message

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