Add comprehensive invariant tests for withdraw_fees (#646) - #853
Open
devcarole wants to merge 656 commits into
Open
Add comprehensive invariant tests for withdraw_fees (#646)#853devcarole wants to merge 656 commits into
devcarole wants to merge 656 commits into
Conversation
devcarole
commented
Apr 23, 2026
- Add 13 invariant tests covering authorization, state consistency, balance conservation
- Tests for large values, event emission, idempotency, overflow protection
- Fix pre-existing compilation errors (duplicate tests, missing error variant, borrow issues)
- All tests pass successfully
…ue/280-add-configurable-max-operators-cap
Integrate jsPDF and autotable for PDF generation Add “Export as PDF” action in transaction history sidebar Format transactions into a structured table (date, type, amount, token, ID) Include wallet address and export timestamp in footer Generate dynamic filenames (stellar-bridge-history-.pdf) Closes leojay-net#293
…timization feat: optimize chat interface for mobile viewports
fixed the replace deprecated stroopsToXlm export in stroops
…2-463 fix: admin type safety, refactor, and styling guidelines (closes leojay-net#460…
…roops Update StellarFiatModal.tsx
skeleton koader
…-integration-with-network-queue add-toastprovider
…ntax, and refactor toastStore for type safety
…et#613, leojay-net#614, leojay-net#617, leojay-net#619 - Issue leojay-net#613: Add invariant tests for deposit function * Test balance increases correctly * Test user deposited tracking * Test total deposited increases * Test receipt issued events * Test multiple deposits same user * Test deposit event emission - Issue leojay-net#614: Add invariant tests for set_operator function * Test operator activation/deactivation * Test operator list consistency * Test event emission * Test idempotent activation/deactivation * Test operator cap enforcement - Issue leojay-net#617: Add edge case validation tests for withdraw_fees * Test zero amount rejection * Test negative amount rejection * Test exact amount withdrawal * Test exceeds accrued amount * Test no fees accrued * Test multiple withdrawals * Test event emission - Issue leojay-net#619: Add edge case validation tests for request_withdrawal * Test zero amount rejection * Test negative amount rejection * Test exceeds net deposited * Test exact deposited amount * Test liabilities update * Test event emission * Test denied address blocking * Test multiple requests same user * Test risk tier tracking
- Changed assertion from req_id > 0 to req_id >= 0 since request IDs can start at 0 - All 29 new invariant and edge case tests now pass
…alidation-schema implemented task
Use an isomorphic layout effect to resolve flag state immediately after hydration while keeping SSR-safe initial state, and add a hydration regression test for useFeatureFlag. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add Soroban proptest coverage for request_withdrawal success and rejection paths, including queue/liability invariants and non-positive amount validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ydration-usefeatureflag-680 fix(frontend): resolve hydration mismatch risk in useFeatureFlag
…ithdrawal-invariants-636 test(contract): add Soroban invariant tests for request_withdrawal
…8-709-711-712-frontend-improvements Fix frontend issues leojay-net#708, leojay-net#709, leojay-net#711, leojay-net#712
…-614-617-619-contract-tests Feat/issues 613 614 617 619 contract tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…eak-replay-docs-677-701 fix: resolve AdminGuard leak and improve replay-protection docs
- Add 13 invariant tests covering authorization, state consistency, balance conservation - Tests for large values, event emission, idempotency, overflow protection - Fix pre-existing compilation errors (duplicate tests, missing error variant, borrow issues) - All tests pass successfully
Author
Add Comprehensive Invariant Tests for withdraw_fees (#646)SummaryThis PR adds 13 rigorous invariant tests for the withdraw_fees function to boost test coverage and ensure robust automated testing of critical paths. Changes
Test ResultsAll 13 tests pass successfully: |
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.