-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
This model requires a dir_root field, but that field should be optional.
Steps to Reproduce
The following code throws an error:
from xrpl.models.requests import LedgerEntry
from xrpl.models.requests.ledger_entry import Directory
directory_request = LedgerEntry(
directory=Directory(
owner="rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
sub_index=0
),
ledger_index="validated"
)The error is:
xrpl.models.exceptions.XRPLModelException: {'dir_root': 'dir_root is not set'}
Workaround / Expected Result
The following code runs successfully, including making a successful query to Testnet:
from xrpl.clients import JsonRpcClient
from xrpl.models.requests import LedgerEntry
directory_request = LedgerEntry(
directory={
"owner": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
"sub_index": 0
},
ledger_index="validated"
)
client = JsonRpcClient("https://s.altnet.rippletest.net:51234/")
response = client.request(directory_request)
print(response.result)Affected Versions
Tested on xrpl-py 4.2.0 and 4.3.1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers