[FEAT] 결제 내역 생성 시 Buyer는 자동 Approve#28
Conversation
생성자(buyer)는 결제 내역을 직접 작성하므로 승인이 불필요하다. create 시 buyerApproved: true, buyerApprovedAt을 자동으로 설정한다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
buyerApproved: true, buyerApprovedAt이 설정되는지 검증하는 케이스를 추가한다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
buyer는 생성 시 자동 승인되므로 approve 엔드포인트 호출 시 400을 반환한다. seller 단독 승인만으로 APPROVED에 도달하도록 모든 e2e 플로우를 수정한다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesBuyer Auto-Approval Flow
Possibly Related PRs
Estimated Code Review Effort🎯 1 (Trivial) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
test/escrow-mock.e2e-spec.ts (1)
1020-1031:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winESCROWED 항목 취소 테스트의 승인 로직 불일치
Line 1022-1026에서 buyer와 seller 모두
approvePayment를 호출하고 있는데, 이는 현재 PR의 변경사항과 맞지 않습니다. Buyer는 이미 자동 승인되었으므로 line 1022-1024는 제거되어야 합니다.🔧 수정 제안
it("ESCROWED 항목 취소 시도 → 400", async () => { - await request(app.getHttpServer()) - .post(`/escrow-payments/${paymentId}/approve`) - .set(asBuyer()); await request(app.getHttpServer()) .post(`/escrow-payments/${paymentId}/approve`) .set(asSeller());🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/escrow-mock.e2e-spec.ts` around lines 1020 - 1031, The test "ESCROWED 항목 취소 시도 → 400" currently calls approve twice (approve as buyer and approve as seller) but per the PR buyer approval is automatic; remove the buyer approve call (the request(...).post(`/escrow-payments/${paymentId}/approve`).set(asBuyer()) invocation) so only the seller approval (the request(...).post(`/escrow-payments/${paymentId}/approve`).set(asSeller())) remains before calling POST /pay and waiting for ESCROWED via waitForEscrowStatus(paymentId, escrowItemId, "ESCROWED").
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@test/escrow-mock.e2e-spec.ts`:
- Around line 1020-1031: The test "ESCROWED 항목 취소 시도 → 400" currently calls
approve twice (approve as buyer and approve as seller) but per the PR buyer
approval is automatic; remove the buyer approve call (the
request(...).post(`/escrow-payments/${paymentId}/approve`).set(asBuyer())
invocation) so only the seller approval (the
request(...).post(`/escrow-payments/${paymentId}/approve`).set(asSeller()))
remains before calling POST /pay and waiting for ESCROWED via
waitForEscrowStatus(paymentId, escrowItemId, "ESCROWED").
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 839c6bbd-8830-4399-bedc-1f70825ddc14
📒 Files selected for processing (6)
src/modules/escrow-payments/__tests__/create.spec.tssrc/modules/escrow-payments/escrow-payments-crud.service.tstest/escrow-mock.e2e-spec.tstest/escrow-rlusd-mock.e2e-spec.tstest/escrow-rlusd-testnet.e2e-spec.tstest/escrow-testnet.e2e-spec.ts
개요
결제 내역 생성 시 Buyer가 승인할 필요 없이 생성 시 승인되도록 수정
Summary by CodeRabbit
릴리스 노트
새로운 기능
개선사항