[_]: fix(account): implement rollback functionality for account and address deletions#84
Conversation
…s deletions - Added `rollbackAccount` and `rollbackAddress` helper methods to handle deletions with a force option. - Updated existing deletion calls in `AccountService` to utilize the new rollback methods. - Enhanced unit tests to verify the correct behavior of account and address rollbacks during error scenarios.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR changes account and address deletion during rollback scenarios in ChangesRollback and force-delete cohort
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant AccountService
participant Provider
participant AccountRepository
Caller->>AccountService: provisionAccount()
AccountService->>Provider: createAccount()
Provider-->>AccountService: success (externalId)
AccountService->>Provider: createProviderLink() / createNetworkBucket()
Provider-->>AccountService: error
AccountService->>AccountService: rollbackAccount(account.id, externalId)
AccountService->>Provider: tryDeleteProviderAccount(externalId)
Provider-->>AccountService: warn on failure (ignored)
AccountService->>AccountRepository: delete(account.id, { force: true })
Sequence: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|



rollbackAccountandrollbackAddresshelper methods to handle deletions with a force option.AccountServiceto utilize the new rollback methods.Summary by CodeRabbit