feat: add invoice lock time limit guard - #2357
Conversation
Implement require_lock_within_time_limit(l) guard to reject actions on expired locks (older than 30 days). This provides defense-in-depth against indefinite invoice freezing by compromised admin credentials. - Add InvoiceLockExpired error variant (1009) - Add LOCK_TIME_LIMIT_SECONDS constant (30 days) - Implement require_lock_within_time_limit() in InvoiceStorage - Integrate guard at all freeze check locations (settlement, lib, contract) - Add negative tests for expired and fresh lock scenarios - Fix duplicate MIN_TRANSFER constant in payments.rs Closes QuickLendX#2103
|
@boalambo 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! 🚀 |
Soroban symbols have a max length of 9 characters. Changed INV_LK_EXP to INV_LK_XPD to comply with this limit.
…/boalambo/quicklendx-protocol into issue-2103-lock-time-limit-guard
|
Hi! Just a quick note about the CI failures. The failures aren't caused by the changes for this PR. They come from compilation errors that already exist after merging the latest For this issue (#2103), I implemented the following:
The current build failures are due to unrelated issues already present after the merge, including duplicate definitions, missing error variants, conflicting trait implementations, and missing imports across several modules. I kept this PR focused on the requested feature instead of trying to fix those unrelated problems. Once the existing merge issues are resolved, this change should build and run as expected. If there is anything else you want me to do, kindly let me know thank you @Baskarayelu |
Implement require_lock_within_time_limit(l) guard to reject actions on
expired locks (older than 30 days). This provides defense-in-depth
against indefinite invoice freezing by compromised admin credentials.
Closes #2103