-
Notifications
You must be signed in to change notification settings - Fork 42
Change development fund to be paid by mostrod #561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes refactor the development fee model to eliminate per-party fee splits. A new Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User as User/Buyer
participant Mostrod as Mostrod
participant DB as Database
participant LND as LND/LNURL
rect rgb(220, 240, 255)
Note over Mostrod,DB: Order Take & Dev Fee Calculation
Mostrod->>Mostrod: Take order & calculate<br/>dev_fee from Mostro fee %
Mostrod->>DB: Store order with dev_fee<br/>(unpaid status)
DB-->>Mostrod: Order persisted
end
rect rgb(240, 220, 255)
Note over Mostrod,LND: Async Dev Fee Payment (Scheduler Job)
par Every 60 seconds
Mostrod->>DB: Query unpaid dev_fees<br/>(settled-hold-invoice/<br/>success statuses)
DB-->>Mostrod: List of dev_fees
end
opt Dev fee amount valid
Mostrod->>LND: Request payment via LNURL
LND-->>Mostrod: Payment hash
Mostrod->>DB: Update dev_fee_paid=true<br/>& dev_fee_payment_hash
DB-->>Mostrod: Success
Mostrod->>Mostrod: Log verification complete
end
opt Payment fails
Mostrod->>Mostrod: Log retry attempt
end
end
rect rgb(220, 255, 220)
Note over User,DB: Seller/Buyer Amount Flows (No Dev Fee Split)
Mostrod->>DB: Seller receives:<br/>order.amount + order.fee
Mostrod->>DB: Buyer pays:<br/>order.amount - order.fee
DB-->>User: Amounts exclude dev_fee
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🧰 Additional context used📓 Path-based instructions (3)src/**/*.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/app/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (7)📓 Common learnings📚 Learning: 2025-07-17T13:51:17.338ZApplied to files:
📚 Learning: 2025-06-25T22:48:44.741ZApplied to files:
📚 Learning: 2025-06-25T22:48:44.741ZApplied to files:
📚 Learning: 2025-04-27T20:07:24.558ZApplied to files:
📚 Learning: 2025-12-17T13:04:13.036ZApplied to files:
📚 Learning: 2025-06-13T12:50:53.424ZApplied to files:
🪛 LanguageTooldocs/DEV_FEE.md[grammar] ~11-~11: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) [grammar] ~210-~210: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) [style] ~493-~493: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym. (ADVERB_REPETITION_PREMIUM) [grammar] ~591-~591: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) [grammar] ~610-~610: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) [grammar] ~702-~702: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) [grammar] ~1547-~1547: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fix #560
Summary by CodeRabbit
New Features
Changes
✏️ Tip: You can customize this high-level summary in your review settings.