Skip to content
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

fix(nami): add bech32 encoding fallback for nami mode #1486

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

mchappell
Copy link
Collaborator

@mchappell mchappell commented Oct 28, 2024

implement try/catch with undefined fallback
prevents nami crashing if bech32 or base8 decode fails, or throws due to:

  • invalid string length
  • mixed formatting
  • any other issue related to encoding

Checklist


Proposed solution

Added try/catch with additional attempt to cast as byron address, with appropriate error fallback

Testing

Use same wallet addr provided in the companion PR before and after applying these changes

implement try/catch with undefined fallback
prevents nami crashing if bech32 or base8 decode fails, or
throws due to:
- invalid string length
- mixed formatting
- any other issue related to encoding
@mchappell mchappell requested a review from a team as a code owner October 28, 2024 11:55
Copy link

sonarcloud bot commented Oct 28, 2024

@pczeglik-iohk
Copy link
Contributor

Allure Report

allure-report-publisher generated test report!

processReports: ✅ test report for 406c7806

passed failed skipped flaky total result
Total 32 0 4 0 36

Copy link
Member

@mkazlauskas mkazlauskas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mchappell mchappell merged commit 3f1a480 into main Oct 29, 2024
30 checks passed
@mchappell mchappell deleted the fix/lw-11769-bech32-encoding branch October 29, 2024 15:13
mchappell added a commit that referenced this pull request Oct 29, 2024
implement try/catch with undefined fallback
prevents nami crashing if bech32 or base8 decode fails, or
throws due to:
- invalid string length
- mixed formatting
- any other issue related to encoding
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.

4 participants