-
Notifications
You must be signed in to change notification settings - Fork 649
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
refactor get_assets to accept id or name #1272
Conversation
optional<asset_object> find_asset(asset_id_type id)const | ||
{ | ||
auto rec = _remote_db->get_assets({id}).front(); | ||
auto rec = _remote_db->get_assets({asset_id_to_string(id)}).front(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ugly as well.
Perhaps better to add another get_assets_by_id()
API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why didn't change find_asset(asset_id_type id)
to find(string)
? Is it an function that only used internally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, I think cli_wallet is less important, it's fine to have some ugly code and slightly reduced performance.
Good job. Thanks. |
I exposed I think it can be of use and wont hurt to have them available for API users. |
pull request to start the work in #1051
the first commit refactor
get_assets
api call to accept name or id on the arguments.i need you guys to take a look so i can continue in this way for all the calls if i can get a green light here.
this follow the same idea of what we did for all account api calls at: #989