-
Notifications
You must be signed in to change notification settings - Fork 0
Fix core offer functionality: resolve PDA escrow mismatch and compilation errors #52
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
|
🧙 Sourcery has finished reviewing your pull request! Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
✅ Deploy Preview for svmp2p ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary:
This is a Work in Progress (WIP) pull request created to address issue #51 regarding implementation of core offer functionality (createOffer and listOffer) in the Solana program. However, the PR currently contains no code changes (0 additions, 0 deletions, 0 changed files).
Review Summary:
No code review issues identified, as there are no code changes to review. After examining the repository, the functionality described in the associated issue appears to already be fully implemented in programs/p2p-exchange/src/instructions/offers.rs with proper escrow handling, validation, and state management. Please provide feedback on this review for future improvements.
Follow-up suggestions:
@devloai close this PR as the functionality already exists, or @devloai help identify what specific improvements are actually needed
…tion errors Co-authored-by: 0xrinegade <[email protected]>
|
@copilot npm run lint |
Completed |
…egacy-peer-deps` command I ran to install dependencies before executing the linting. The diff shows numerous packages being marked as `dev: true` and some peer dependencies being cleaned up, which is normal behavior when dependencies are properly resolved and categorized. Install dependencies and run linting as requested by @0xrinegade Co-authored-by: 0xrinegade <[email protected]>

This PR addresses the reported missing
createOfferandlistOfferfunctionality by fixing compilation errors and resolving implementation mismatches that prevented the already-implemented core offer system from working properly.🔍 Issue Analysis
The issue description suggested missing core offer functionality, but investigation revealed that
createOfferandlistOfferinstructions were already fully implemented inprograms/p2p-exchange/src/instructions/offers.rs. The real problems were:disputes.rspreventing the project from building🔧 Changes Made
1. Fixed Compilation Error
2. Resolved PDA Escrow Mismatch
Updated IDL and frontend to use secure Program Derived Address (PDA) approach:
IDL Update:
{ "name": "escrowAccount", "isMut": true, "isSigner": false // Changed from true to false for PDA }Frontend Update:
✅ Functionality Confirmed
All core offer functionality is working as specified:
createOffer: Creates offer account, validates inputs, transfers SOL to secure escrow PDAlistOffer: Transitions offer status from Created to Listed with proper validation🧪 Validation
Created comprehensive validation script that confirms:
🎯 Impact
The P2P exchange core offer functionality is now fully operational and meets all security requirements.
Fixes #51.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.