Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve PriceData import for better readability #787

Open
ObiajuluM opened this issue Dec 29, 2024 · 2 comments
Open

Improve PriceData import for better readability #787

ObiajuluM opened this issue Dec 29, 2024 · 2 comments

Comments

@ObiajuluM
Copy link

Currently, to import the PriceData class for building Price Oracle transactions, users need to use the following import statement:

from xrpl.models.transactions.oracle_set import PriceData

This import path is relatively long and can be less intuitive for users already used to the existing model import style. I propose adding a more direct import option.

from xrpl.models import PriceData

I understand this is essentially syntactical sugar, but it would significantly improve the readability and user experience when working with Price Oracle transactions.

Expected Behavior:
The PriceData class should be directly importable from the xrpl.models module.

thanks

@ckeshava
Copy link
Collaborator

Hello, thanks for explaining your issue.

I'd like to get the opinions of a few other developers on this topic. I believe PriceData is only used inside OracleSet transaction, this was the motivation for the organization of the code files. I'm not opposed to re-arranging them.

@ObiajuluM
Copy link
Author

If this is something you decide to move forward with, the same thing can be applied to Offers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants