Skip to content

feat: wire seller confirmation to approve-milestones (#310) - #336

Open
Killerjunior wants to merge 3 commits into
Kaizenode:mainfrom
Killerjunior:feature/issue-310-wire-seller-confirmation
Open

feat: wire seller confirmation to approve-milestones (#310)#336
Killerjunior wants to merge 3 commits into
Kaizenode:mainfrom
Killerjunior:feature/issue-310-wire-seller-confirmation

Conversation

@Killerjunior

@Killerjunior Killerjunior commented Jul 21, 2026

Copy link
Copy Markdown

📝 feat: Wire seller confirmation to approve-milestones (#310)

🛠️ Issue

📖 Description

  • Connects the seller confirmation flow in /p2p/chat when accepting a payment request after a buyer marks a milestone as completed.
  • Calls POST /escrow/single-release/v2/approve-milestones with { contractId, approver: sellerAddress, milestoneIndexes: [0] }.
  • Prompts the seller's wallet (e.g., Freighter) to sign the returned unsignedXdr and submits the signed transaction via POST /escrow/send-transaction.
  • Updates the UI status to "approved, ready for release" once the transaction is confirmed.

✅ Changes made

  • lib/trustless-work.ts: Added approveMilestones and sendTransaction endpoints to trustlessWork.escrow alongside the signAndSendTransaction helper.
  • frontend/components/PaymentBubble: Updated status types and UI rendering to enable the accept button only when the milestone is completed by the buyer, and added the "approved, ready for release" state display.
  • frontend/components/chat/types.ts: Updated PaymentStatus and PaymentRequestMessage interface to include contractId and sellerAddress.
  • app/p2p/chat/page.tsx: Created the /p2p/chat page implementing the full seller confirmation, wallet signing, and state update pipeline.

🖼️ Media (screenshots/videos)

milestone_approved_1784736757606

📜 Additional Notes

  • The action is disabled until the milestone status is marked as completed from the buyer's side.
  • Installed @stellar/freighter-api to enable wallet transaction signing integration.

@diegoTech14

Copy link
Copy Markdown
Contributor

Hello @Killerjunior could you upload images or video evidence please?

@Killerjunior

Copy link
Copy Markdown
Author

Noted. Uploading now.

Killerjunior added a commit to Killerjunior/SafeSwap that referenced this pull request Jul 22, 2026
@Killerjunior
Killerjunior force-pushed the feature/issue-310-wire-seller-confirmation branch from 71a509f to 05be18a Compare July 22, 2026 16:25
@Killerjunior

Copy link
Copy Markdown
Author

Screenshots have been added in the PR description as well as walkthrough.md file. Kindly review once more.

@diegoTech14

Copy link
Copy Markdown
Contributor

Hi @Killerjunior could you resolve conflicts please?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wire seller confirmation to POST /escrow/single-release/v2/approve-milestones

2 participants