Repository navigation
fix(isBtcAddress): verify address checksums - #2983
Open
sanketpatel32 wants to merge 4 commits into
Open
sanketpatel32 wants to merge 4 commits into
sanketpatel32 wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2983 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 114 115 +1
Lines 2599 2725 +126
Branches 658 664 +6
==========================================
+ Hits 2599 2725 +126 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Author
|
Added fixtures covering the missing invalid witness-version and base58check length/version branches in 30234c3. |
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.
isBtcAddressnow verifies Bitcoin address checksums instead of relying only on address shape:bc1p/tb1ptaproot addresses.Two pre-existing valid fixtures were replaced because they only passed while checksums were ignored.
14qViLJfdGaP4EeHnDyJbEGQysnCpwk3gdhad an incorrect checksum, so it was replaced with the corrected checksum encoding of the same payload (14qViLJfdGaP4EeHnDyJbEGQysnCpwn1gZ).17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemtdecoded to 26 bytes rather than a 25-byte base58check payload, so it was replaced with the valid genesis address1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa.The README now documents checksum validation. No runtime dependencies were added, and no generated distribution files are committed.
Fixes #2982
References:
Validation performed:
npm run lintnpm test(323 passing)Checklist