Repository navigation
Fix/issues 1685 1688 - #1822
Merged
Merged
Fix/issues 1685 1688#1822
Conversation
added 4 commits
November 24, 2026 01:40
The pool's deposit now takes four arguments including min_rate, but buildDepositTx was still sending three. This caused simulation failures preventing investors from depositing from the invest page.
…activated, get_lifetime_reward_cap Add tests for auth requirements, bps upper bounds validation, and activation state after the first deposit.
…nce expiration and pause state Cover terminal and pending proposal pruning, allowance expiration after approve with expiration ledger and after expiry, and pause state getter.
Cover the complete flow from funded invoice to default through liquidation, insurance claim, and auction clearing. Asserts LP NAV, insurance reserve, and SME credit score at each step.
|
@Alaka-ibr 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! 🚀 |
Alaka-ibr
force-pushed
the
fix/issues-1685-1688
branch
from
November 24, 2026 05:44
c352ff9 to
c68c110
Compare
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.
Fix issues #1685, #1686, #1687, #1688
This PR addresses four open issues related to test coverage gaps and a frontend bug preventing deposits.
Issue #1688: Fix frontend buildDepositTx missing min_rate argument
Closes #1688
Problem: The pool's
depositfunction now requires four arguments includingmin_rate, butbuildDepositTxinfrontend/lib/contracts.tswas still passing only three arguments. This caused simulation failures preventing investors from depositing from the invest page.Solution: Updated
buildDepositTxto passxdr.ScVal.scvVoid()as the fourth argument to match the pool contract's signature.Files changed:
frontend/lib/contracts.tsIssue #1685: Add test coverage for referral contract functions
Closes #1685
Problem:
set_pool,set_deposit_reward_bps,is_activated, andget_lifetime_reward_caphad no test coverage incontracts/referral/tests.Solution: Created
contracts/referral/tests/admin_tests.rswith comprehensive tests covering:set_poolandset_deposit_reward_bpsFiles changed:
contracts/referral/tests/admin_tests.rs(new)contracts/referral/Cargo.tomlIssue #1686: Add test coverage for access_control and share contracts
Closes #1686
Problem: Three functions lacked test coverage:
access_control::prune_proposal(pruning terminal vs pending proposals)share::get_allowance_expiration(after approve with expiration and after expiry)share::is_paused(pause state getter)Solution: Added tests covering all three functions:
prune_proposal: tests for removing terminal proposals, rejecting pending proposals before expiry, and removing expired pending proposalsget_allowance_expiration: tests for retrieving expiration after approve and after ledger advances past expiryis_paused: tests for default state and after pause/unpause operationsFiles changed:
contracts/access_control/tests/lifecycle_tests.rscontracts/share/tests/lib.rsIssue #1687: Add integration test for full default pipeline
Closes #1687
Problem: No integration test exercised the complete permissionless default handling flow:
pool.liquidate_invoice→insurance.file_claim→ auction clearing.Solution: Created
contracts/tests/tests/liquidation_tests.rswith an end-to-end test covering:pool.liquidate_invoiceinsurance.file_claimFiles changed:
contracts/tests/tests/liquidation_tests.rs(new)contracts/tests/Cargo.tomlTesting
All new tests follow existing patterns and conventions. The referral, access_control, and share tests use the standard test setup helpers. The integration test uses the imported WASM artifacts approach consistent with other integration tests.