Skip to content

fix: silent success issues surfaced during coverage upping - #81

Merged
jplomas merged 1 commit into
theQRL:masterfrom
jplomas:master
Sep 9, 2026
Merged

jplomas merged 1 commit into
theQRL:masterfrom
jplomas:master

Conversation

@jplomas

@jplomas jplomas commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces significant improvements to error handling, asynchronous library loading, and input validation across several commands related to wallet and key management. The main goals are to make error messages more informative, ensure proper sequencing when waiting for cryptographic libraries to load, and fix some logic around file input and fee handling.

The most important changes are:

Improved Asynchronous Library Loading

  • Refactored waitForQRLLIB, waitForDILLIB, and waitForKYBLIB to return Promises and be await-able, ensuring that commands only proceed after the library has loaded and the callback has completed. This prevents unhandled rejections and makes error handling more robust in generate-lattice-keys.js, generate-shared-keys.js, and create-wallet.js. [1] [2] [3]

Error Handling and User Feedback Enhancements

  • Improved error messages for wallet decryption failures and invalid input files, including distinguishing between invalid files and incorrect passwords, and providing more informative output for decryption and transaction errors in balance.js, dump-transactions.js, and generate-lattice-keys.js. [1] [2] [3]

Input Validation and File Handling

  • Fixed logic to properly handle empty or unreadable files, making file emptiness checks asynchronous and awaited, and clarifying unreachable code paths with comments and coverage hints in generate-shared-keys.js. [1] [2] [3] [4]
  • Moved wallet file reading inside try/catch blocks to ensure that directory reads and other filesystem errors are handled gracefully, and improved the logic for handling wallet files in balance.js and dump-transactions.js. [1] [2]

Fee Handling and Documentation

  • Corrected fee parsing logic to allow a zero fee (which is valid), updated the default fee to 0 in both code and help text, and improved validation for negative or non-numeric fees in generate-lattice-keys.js. [1] [2]

API Rate Limiting

  • Clarified and simplified the logic for pausing between paginated API requests, ensuring the pause only occurs when more pages are present in dump-transactions.js.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.88%. Comparing base (1fd6464) to head (922328d).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master      #81       +/-   ##
===========================================
+ Coverage   65.26%   99.88%   +34.62%     
===========================================
  Files          26       26               
  Lines        3463     3500       +37     
===========================================
+ Hits         2260     3496     +1236     
+ Misses       1203        4     -1199     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jplomas
jplomas merged commit 81c2386 into theQRL:master Sep 9, 2026
4 checks passed
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.11.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants