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 from 687255a to fa6ee44 Compare February 11, 2026 19:38
… 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 fa6ee44 to c303187 Compare February 11, 2026 20:12
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.

1 participant