-
Notifications
You must be signed in to change notification settings - Fork 0
WIP: major overhaul to miner/vault overlays + handling of tokens #20
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
base: main
Are you sure you want to change the base?
Conversation
calebjclark
commented
Jul 7, 2025
- The flow to create a new miner is undergoing a major overhaul. The first overlay screen is laid out but not fully implemented.
- The create a vault overlay has been laid out but not fully implemented. It follows the same flow as creating a miner.
- Commander now uses microgons and micronots for storing tokens. It only converts to argons in UI display.
if (this._value > max) { | ||
this._value = max; | ||
if (format.includes('%')) { | ||
format = format.replace('%', '+%'); |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 12 days ago
To fix the issue, the replace
method should be updated to use a regular expression with the global (g
) flag. This ensures that all occurrences of the %
character in the format
string are replaced, not just the first one. Specifically, the string '%'
should be replaced with the regular expression /\%/g
. This change will ensure that the code behaves correctly even if the format
string contains multiple %
characters.
-
Copy modified line R35
@@ -34,3 +34,3 @@ | ||
if (format.includes('%')) { | ||
format = format.replace('%', '+%'); | ||
format = format.replace(/%/g, '+%'); | ||
} else { |