Skip to content

fix(tx): return short transaction ids whole instead of a RangeError#677

Open
joshuakrueger-dfx wants to merge 1 commit into
RealUnitCH:developfrom
joshuakrueger-dfx:joshua/fix-657-p9l1-shorttxid
Open

fix(tx): return short transaction ids whole instead of a RangeError#677
joshuakrueger-dfx wants to merge 1 commit into
RealUnitCH:developfrom
joshuakrueger-dfx:joshua/fix-657-p9l1-shorttxid

Conversation

@joshuakrueger-dfx
Copy link
Copy Markdown
Collaborator

Addresses Issue #657 — Part 9, finding L1.

asShortTxId sliced substring(0,10) + substring(length-10) unconditionally → RangeError for ids shorter than 10 chars (public String extension), and head/tail overlap for 10–19 chars. Now returns the id whole when it is no longer than the elided form (23). New RED→GREEN regression (proven), analyze clean.

🤖 Fleet-confirmed defect, hand-finished by operator. Ref #657.

asShortTxId did substring(0, 10) + substring(length - 10) unconditionally, so
any id shorter than 10 chars crashed with a RangeError and ids 10–19 chars
long overlapped head/tail. Return the id whole when it is no longer than the
elided form (23 chars).

Regression: test/packages/service/transaction_history_service_test.dart

Issue RealUnitCH#657 — Part 9, finding L1.
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