feature/seller-soroban-registration#171
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds seller on-chain registration feature: new Seller module (controller, service, DTOs), routes for building and submitting registration XDRs, and status retrieval. Updates User entity and introduces a migration to add payout wallet and registration flag. Includes unit and e2e tests. Changes primary key strategy for users to numeric IDs. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Seller as Seller (authenticated)
participant API as SellerController
participant Svc as SellerService
participant DB as Users Repo
Seller->>API: POST /seller/contract/build-register {payoutWallet}
API->>Svc: buildRegister(userId, dto)
Svc->>DB: findOne(userId)
DB-->>Svc: User
Svc->>DB: findOne({payoutWallet})
DB-->>Svc: (exists?|null)
Svc-->>API: { unsignedXdr, contractAddress }
API-->>Seller: { success, data }
rect rgba(230, 245, 255, 0.5)
note over Svc: Mock Soroban XDR build (placeholder)
end
sequenceDiagram
autonumber
actor Seller as Seller (authenticated)
participant API as SellerController
participant Svc as SellerService
participant DB as Users Repo
Seller->>API: POST /seller/contract/submit {signedXdr}
API->>Svc: submitRegister(userId, dto)
Svc->>DB: findOne(userId)
DB-->>Svc: User
Svc->>Svc: validate signedXdr (mock)
alt valid
Svc->>DB: update(userId, { payoutWallet, sellerOnchainRegistered: true })
DB-->>Svc: OK
Svc-->>API: { transactionHash, contractId, payoutWallet, registered: true }
API-->>Seller: { success, data }
else invalid
Svc-->>API: BadRequestException
API-->>Seller: 400 error
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (9)
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 |
🚀 StarShop Pull Request
#156
Mark with an
xall the checkboxes that apply (like[x])📌 Type of Change
📝 Changes description
⏰ Time spent breakdown
Summary by CodeRabbit
New Features
Tests