Fix error in account_objects request type filter#895
Fix error in account_objects request type filter#895ckeshava wants to merge 2 commits intoXRPLF:mainfrom
Conversation
WalkthroughThe AccountObjects request model now accepts canonical ledger entry names as strings (e.g., "Escrow") in addition to the AccountObjectType enum, aligning with rippled 2.4.0's ledger entry naming support. A test validates both enum and string type filtering. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧠 Learnings (3)📚 Learning: 2024-10-30T20:32:03.246ZApplied to files:
📚 Learning: 2025-06-04T22:17:47.822ZApplied to files:
📚 Learning: 2024-11-04T19:41:04.808ZApplied to files:
🧬 Code graph analysis (1)tests/integration/reqs/test_account_objects.py (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🔇 Additional comments (4)
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 |
|
|
||
| method: RequestMethod = field(default=RequestMethod.ACCOUNT_OBJECTS, init=False) | ||
| type: Optional[AccountObjectType] = None | ||
| type: Optional[Union[AccountObjectType, str]] = None |
There was a problem hiding this comment.
I think same applies to LedgerEntryType based on XRPLF/rippled#5271. Can you check and update LedgerData request as well?
|
|
||
| method: RequestMethod = field(default=RequestMethod.ACCOUNT_OBJECTS, init=False) | ||
| type: Optional[AccountObjectType] = None | ||
| type: Optional[Union[AccountObjectType, str]] = None |
There was a problem hiding this comment.
Instead of just using a str there should probably be another enum for the actual ledger entry types
High Level Overview of Change
fix #888: Allow canonical case-insensitive ledger-object names in type filter. Please refer to the issue description for more context on this issue.
Type of Change
Did you update CHANGELOG.md?
Test Plan
Added a new test with canonical
strinputs to the type filer in theaccount_objectsrequest.