-
Notifications
You must be signed in to change notification settings - Fork 13
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 returns assets without metadata #123
Conversation
This one is fixing the get asset endpoint. We'll also need to partially revert #40 for the other endpoints, but we may keep it as a separate effort |
let (save_values, owner_type_update) = | ||
mint_accs_to_save.to_owned().clone().into_iter().fold( | ||
(HashMap::new(), HashMap::new()), | ||
|mut acc: (HashMap<_, _>, HashMap<_, _>), mint| { |
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'd suggest having 2 named hashmaps here to improve readability
None, | ||
OwnerType::Single, | ||
), | ||
owner_type: Updated::default(), |
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.
Is it a correct assumption that we need slot_updated == 0 and ownertype == unknown for token accounts? I'm not following the logic with the zero slot_updated
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.
OwnerType field will be updated during Mint account processing, transform_and_save_mint_accs() method. During token account update we should not change that value. It's implemented this way because value of OwnerType depends on supply of mint account, during token account update we don't have this info
What
This PR add ablity to the API to return assets without off chain metadata
UPD
Also this PR adds updating ownership model row and returning FungibleAsset and FungibleToken interfaces when it's required, previously it was returning Custom interface value