Repository navigation
fix: resolve issues #861, #862, #864, and #866 - #1025
Merged
k-deejah merged 1 commit intoOct 22, 2026
Merged
Conversation
…t#866 - FeeEstimator (Sorokit#861): ensure polling interval is cleared unconditionally on unmount - BatchPaymentProcessor (Sorokit#862): validate memo byte length using TextEncoder (28-byte limit) - SwapSimulator (Sorokit#864): enforce MINIMUM_LIQUIDITY_THRESHOLD and prevent NaN/Infinity for near-zero pool reserves - GovernanceDashboard (Sorokit#866): verify proposal list, vote casting confirmation dialog, and delegation panel functionality and test coverage Closes Sorokit#861 Closes Sorokit#862 Closes Sorokit#864 Closes Sorokit#866
|
@Bilalishaq7 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
• FeeEstimator (#861): Documented and verified unconditional polling interval cancellation on unmount and visibility changes via cancel watchers and
useFeeData, preventing dangling timers whenuseIsVisiblereports false at unmount time.• BatchPaymentProcessor (#862): Enforced Stellar
MEMO_TEXT28-byte limit validation usingnew TextEncoder().encode(memo).lengthinstead of character count. Covered 10-emoji and mixed-script multi-byte validation.• SwapSimulator (#864): Enforced
MINIMUM_LIQUIDITY_THRESHOLDto prevent division-by-zero,NaN, andInfinityon near-zero or zero liquidity pools, showing "Insufficient liquidity" warning instead.• GovernanceDashboard (#866): Verified complete implementation of
GovernanceDashboardsurface includingProposalList(contract read),VoteDialog(confirmation and contract invoke), andDelegationPanel(delegate viewing and modification), along with module exports and smoke-tests.Why
• #861: Polling intervals in
FeeEstimatormust be reliably cleared when unmounted, even if the component is hidden/invisible at unmount time.• #862: Stellar memos are constrained by 28 bytes rather than 28 characters. Emojis and multi-byte unicode strings could pass character length checks but fail at Horizon/Soroban submission.
• #864: Calculating price impact on pools with near-zero or 0 reserves resulted in
NaNorInfinity, breaking display and user controls.• #866: Governance voting is an essential Soroban dApp feature, requiring proposal lists, vote casting confirmation dialogs, and voting delegation management.
Implementation
•
src/components/FeeEstimator.tsx&src/components/FeeEstimator.test.tsx:•
src/components/BatchPaymentProcessor.tsx&src/components/BatchPaymentProcessor.test.tsx:new TextEncoder().encode(entry.memo).length > 28byte-length check with dedicated tests for ASCII, multi-byte CJK, and emoji strings (BatchPaymentProcessor — validateEntries checks memo character length instead of byte length #862).•
src/components/SwapSimulator.tsx&src/components/SwapSimulator.test.tsx:MINIMUM_LIQUIDITY_THRESHOLDcheck and "Insufficient liquidity" display with tests covering zero-liquidity pools and preventing NaN/Infinity (SwapSimulator — price impact formula produces Infinity/NaN for near-zero pool liquidity #864).•
src/components/GovernanceDashboard.tsx&src/components/GovernanceDashboard.test.tsx:GovernanceDashboardimplementation withProposalList,VoteDialog, andDelegationPanel, exported insrc/components/index.tsand validated viasrc/__tests__/exports.test.ts(Implement GovernanceDashboard — proposal list, vote casting, and delegation UI #866).Testing
•
npm run validate: Passed (0 TypeScript errors, 0 ESLint errors).•
npm test -- src/components/FeeEstimator.test.tsx --run: 40/40 passed.•
npm test -- src/components/BatchPaymentProcessor.test.tsx --run: 29/29 passed.•
npm test -- src/components/SwapSimulator.test.tsx --run: 42/42 passed.•
npm test -- src/components/GovernanceDashboard.test.tsx --run: 19/19 passed.•
npm test -- src/__tests__/exports.test.ts --run: 4/4 passed.•
npm run test:exports: Passed.•
npm run build && npm run build:app: Both library and application production bundles compiled cleanly.Scope / Risk
• Non-breaking changes. Scoped strictly to validation precision, unmount cleanup safeguards, and test suite tracking compliance.
Issue
Closes #861
Closes #862
Closes #864
Closes #866