-
Notifications
You must be signed in to change notification settings - Fork 3
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
API: Add an option to fetch the raw name and symbol #62
Conversation
(name_result, symbol_result) | ||
} | ||
|
||
pub fn v1_content_from_json( | ||
asset_data: &asset_data::Model, | ||
cdn_prefix: Option<String>, | ||
raw_data: Option<bool>, |
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 is this being added here? I don't follow the logic. The raw data is for the on-chain data, not the off-chain data. This method shouldn't be touched.
|
||
payload = GetAsset { | ||
id, | ||
raw_data: sequence_parser.optional_next::<bool>().unwrap_or(None), |
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.
I would prefer a nested field that looks like this: "formatting": { "trimWhitespace": true/false }
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.
And default trimWhitespace to true
.
name: Option<String>, | ||
symbol: Option<String>, | ||
asset_data: &AssetData, | ||
fn process_raw_fields( |
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 is this method needed now?
No description provided.