Skip to content

Fix funded status, ledger resilience, orphan wallets, and platform ap…#136

Open
devsimze wants to merge 1 commit into
Savitura:mainfrom
devsimze:fix/ledger-funded-platform-security-125-130
Open

Fix funded status, ledger resilience, orphan wallets, and platform ap…#136
devsimze wants to merge 1 commit into
Savitura:mainfrom
devsimze:fix/ledger-funded-platform-security-125-130

Conversation

@devsimze
Copy link
Copy Markdown
Contributor

Summary

Closes #125
Closes #126
Closes #127
Closes #130

Test plan

  • npm test in backend/ — new/updated tests for ledgerMonitor, campaigns, and withdrawals
  • Create a campaign and contribute until raised_amount >= target_amount; confirm status becomes funded on detail page without manual DB edit
  • Contribute again after funded; confirm status stays funded and raised_amount increases
  • Simulate DB failure on campaign insert; confirm 500 response and orphaned wallet log line
  • With PLATFORM_APPROVER_USER_ID set, confirm non-matching user gets 403 on platform approve/reject
  • With PLATFORM_APPROVER_USER_ID unset, confirm platform approval is denied and startup warning is logged

…proval.

Atomic campaign funding on payment, balance reconciliation, safer campaign
creation errors, and fail-closed platform approver gating for withdrawals.

Co-authored-by: Cursor <cursoragent@cursor.com>
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@devsimze 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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment