fix: error handling for wallet is already present error#1543
fix: error handling for wallet is already present error#1543pranalidhanavade merged 1 commit intomainfrom
Conversation
Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
📝 WalkthroughWalkthroughThe wallet provisioning validation logic in the agent service was expanded to treat both Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting 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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/agent-service/src/agent-service.service.ts (1)
731-739: Inconsistent wallet existence check increateTenant.The
createTenantmethod only checks forWALLET_CREATEDstatus, while the updatedprovisionWalletmethod now checks for bothWALLET_CREATEDandDID_CREATED. Consider applying the same fix here for consistency.🔧 Suggested fix
- if (AgentSpinUpStatus.WALLET_CREATED === getOrgAgent?.agentSpinUpStatus) { + if ( + AgentSpinUpStatus.WALLET_CREATED === getOrgAgent?.agentSpinUpStatus || + AgentSpinUpStatus.DID_CREATED === getOrgAgent?.agentSpinUpStatus + ) {
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/agent-service/src/agent-service.service.ts
🔇 Additional comments (1)
apps/agent-service/src/agent-service.service.ts (1)
188-196: LGTM! Correctly expanded wallet existence check.The fix appropriately treats both
WALLET_CREATEDandDID_CREATEDas indicators that a wallet already exists. SinceDID_CREATEDis a progression fromWALLET_CREATED, both states should prevent duplicate wallet provisioning attempts.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.



What
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.