Fix/multi issue 568 569 570 571 - #589
Merged
ogazboiz merged 4 commits intoMay 30, 2026
Merged
Conversation
Collapse the two near-identical leading lines into a single clear sentence. Closes LabsCrypt#568 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Set aria-busy={loading} on the button element, mark the spinner SVG
aria-hidden="true", and add a visually-hidden "Loading" span so screen
readers announce the in-progress state on every loading button.
Closes LabsCrypt#569
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Guard the progress calc against deposited === 0 (was NaN/Infinity) by returning 0 and clamping the result to 0–100. Add aria-label="Close" to the X button so screen readers announce it consistently with other modals in the app. Closes LabsCrypt#570 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the private formatAmount(raw, decimals) at the bottom of TransactionTracker.tsx with the canonical helper from @/utils/amount. The local copy used BigInt(10 ** decimals) which is fragile for decimals > 15; the shared util uses the safe 10n ** BigInt(decimals) form. Closes LabsCrypt#571 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Description
Four small, independent fixes across contracts and frontend: a duplicate doc comment, two accessibility gaps, and a duplicate utility function.
Type of Change
Related Issues
Closes #568 , Closes #569 , Closes #570 , Closes #571
Changes Made
#568 —
contracts/stream_contract/src/events.rs/// Emitted when a stream is paused.) from theStreamPausedEventdoc comment, keeping the more precise second line (/// Emitted when a sender pauses an active stream.).#569 —
frontend/src/components/ui/Button.tsxaria-busy={loading}to the<button>element so screen readers announce the in-progress state.aria-hidden="true"to suppress its meaningless announcement.<span className="sr-only">Loading</span>alongside the spinner so assistive technology reads a meaningful label whenloadingis true.#570 —
frontend/src/components/dashboard/StreamDetailsModal.tsxdeposited > 0 ? Math.min(100, Math.max(0, (withdrawn / deposited) * 100)) : 0— wasNaN/Infinitywhendeposited === 0.aria-label="Close"to the × close button, consistent with other modals in the app.#571 —
frontend/src/components/TransactionTracker.tsxformatAmountfrom the shared@/utils/amountutility.formatAmount(raw, decimals)at the bottom of the file. The local copy usedBigInt(10 ** decimals)which is fragile fordecimals > 15; the shared util uses the safe10n ** BigInt(decimals)form.Testing
Test Coverage
Test Steps
#568
cd contracts && cargo build— confirms the contract still compiles cleanly.#569
aria-busy="true"present on<button>, spinner hasaria-hidden="true", and a.sr-only"Loading" span is in the DOM.#570
deposited === 0— progress bar renders at 0% (was broken/NaNwidth).#571
confirmedstate — the "Summary of Changes" section renders amounts correctly.cd frontend && npm run build— no TypeScript errors inTransactionTracker.tsx.Screenshots/Demo
No visual regression — the spinner appearance, modal layout, and transaction tracker UI are unchanged.
Checklist
Additional Notes
lib/amountvsutils/amountconsolidation ([Frontend] Consolidate duplicate amount helpers in lib/amount.ts and utils/amount.ts #520) settles on;@/utils/amountwas chosen as it is the more complete file and is already used by the majority of components and the test suite.bg-gradient-to-br→bg-linear-to-brIDE suggestion inStreamDetailsModal.tsxis a pre-existing lint suggestion unrelated to this PR and is left untouched per the "out of scope" constraint.