fix(tx): return short transaction ids whole instead of a RangeError#677
Open
joshuakrueger-dfx wants to merge 1 commit into
Open
fix(tx): return short transaction ids whole instead of a RangeError#677joshuakrueger-dfx wants to merge 1 commit into
joshuakrueger-dfx wants to merge 1 commit into
Conversation
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.
6bb97d2 to
98f5a07
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses Issue #657 — Part 9, finding L1.
asShortTxIdslicedsubstring(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.