-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better rendering of bech32 error messages #1625
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
bors r+ |
1625: Better rendering of bech32 error messages r=KtorZ a=Anviking Like #1619, but with `master` as base branch 🤦♂️ Co-authored-by: Johannes Lund <[email protected]>
Timed out |
bors r+ |
1625: Better rendering of bech32 error messages r=Anviking a=Anviking Like #1619, but with `master` as base branch 🤦♂️ Co-authored-by: Johannes Lund <[email protected]>
Build failed |
bors r+ |
1625: Better rendering of bech32 error messages r=Anviking a=Anviking Like #1619, but with `master` as base branch 🤦♂️ Co-authored-by: Johannes Lund <[email protected]>
Build failed |
Those test failures look like a problem with flaky test setup. It says the wallet doesn't exist. |
where | ||
go _c [] [] = mempty | ||
go c (i:is) (s:ss) | ||
| c == i = red ++ s:def ++ go (c + 1) is ss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will output 2 ansi escape sequences for each invalid character.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but it still works, and multiple invalid characters should be rare.
- marking invalid characters red $ cardano-wallet-byron key public xprv18rp[..] Bech32 error: Invalid character(s) in string xprv18rppm7hzl6[...]qvy6zgldkö
7b53de7
to
1f36bc5
Compare
did rebasing help? |
unCharPos (CharPosition x) = x | ||
|
||
markCharsRedAtIndices :: Integral i => [i] -> String -> String | ||
markCharsRedAtIndices ixs txt = go 0 ixs txt ++ def |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should perhaps sort the ixs
here 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think it's off, will follow up with property test and fix
Build succeeded |
Like #1619, but with
master
as base branch 🤦♂️