Add listing query for collection#814
Open
alchemistgo87 wants to merge 6 commits into
Open
Conversation
kespinola
requested changes
Oct 12, 2022
kespinola
left a comment
Contributor
There was a problem hiding this comment.
To reduce complexity we should hold off on this until moonrank collections are in place that way we don't need to do the switching between mcc and me collections.
ray-kast
suggested changes
Nov 9, 2022
| Expiry, | ||
| } | ||
|
|
||
| /// Input parameters for the [`collection_nfts`] query. |
Contributor
There was a problem hiding this comment.
Suggested change
| /// Input parameters for the [`collection_nfts`] query. | |
| /// Input parameters for the `collection_nfts` query. |
| pub thirty_day_marketcap_change: i32, | ||
| } | ||
|
|
||
| impl<'a> TryFrom<models::CollectionTrend> for CollectionTrend { |
Contributor
There was a problem hiding this comment.
Suggested change
| impl<'a> TryFrom<models::CollectionTrend> for CollectionTrend { | |
| impl TryFrom<models::CollectionTrend> for CollectionTrend { |
Comment on lines
+975
to
+1024
| floor_price: floor_price.try_into().unwrap_or_default(), | ||
| nft_count: nft_count.try_into()?, | ||
| one_day_volume: one_day_volume.try_into().unwrap_or_default(), | ||
| seven_day_volume: seven_day_volume.try_into().unwrap_or_default(), | ||
| thirty_day_volume: thirty_day_volume.try_into().unwrap_or_default(), | ||
| one_day_sales_count: one_day_sales_count.try_into().unwrap_or_default(), | ||
| seven_day_sales_count: seven_day_sales_count.try_into().unwrap_or_default(), | ||
| thirty_day_sales_count: thirty_day_sales_count.try_into().unwrap_or_default(), | ||
| prev_one_day_volume: prev_one_day_volume.try_into().unwrap_or_default(), | ||
| prev_seven_day_volume: prev_seven_day_volume.try_into().unwrap_or_default(), | ||
| prev_thirty_day_volume: prev_thirty_day_volume.try_into().unwrap_or_default(), | ||
| prev_one_day_sales_count: prev_one_day_sales_count.try_into().unwrap_or_default(), | ||
| prev_seven_day_sales_count: prev_seven_day_sales_count | ||
| .to_u64() | ||
| .unwrap_or_default() | ||
| .into(), | ||
| prev_thirty_day_sales_count: prev_thirty_day_sales_count | ||
| .to_u64() | ||
| .unwrap_or_default() | ||
| .into(), | ||
| prev_one_day_floor_price: prev_one_day_floor_price.try_into().unwrap_or_default(), | ||
| prev_seven_day_floor_price: prev_seven_day_floor_price | ||
| .to_u64() | ||
| .unwrap_or_default() | ||
| .into(), | ||
| prev_thirty_day_floor_price: prev_thirty_day_floor_price | ||
| .to_u64() | ||
| .unwrap_or_default() | ||
| .into(), | ||
| prev_one_day_marketcap: prev_one_day_marketcap.to_u64().unwrap_or_default().into(), | ||
| prev_seven_day_marketcap: prev_seven_day_marketcap.to_u64().unwrap_or_default().into(), | ||
| prev_thirty_day_marketcap: prev_thirty_day_marketcap | ||
| .to_u64() | ||
| .unwrap_or_default() | ||
| .into(), | ||
| one_day_volume_change: one_day_volume_change.try_into()?, | ||
| seven_day_volume_change: seven_day_volume_change.try_into()?, | ||
| thirty_day_volume_change: thirty_day_volume_change.try_into()?, | ||
| one_day_floor_price_change: one_day_floor_price_change.try_into()?, | ||
| seven_day_floor_price_change: seven_day_floor_price_change.try_into()?, | ||
| thirty_day_floor_price_change: thirty_day_floor_price_change.try_into()?, | ||
| one_day_sales_count_change: one_day_sales_count_change.try_into()?, | ||
| seven_day_sales_count_change: seven_day_sales_count_change.try_into()?, | ||
| thirty_day_sales_count_change: thirty_day_sales_count_change.try_into()?, | ||
| one_day_marketcap: one_day_marketcap.try_into().unwrap_or_default(), | ||
| seven_day_marketcap: seven_day_marketcap.try_into().unwrap_or_default(), | ||
| thirty_day_marketcap: thirty_day_marketcap.try_into().unwrap_or_default(), | ||
| one_day_marketcap_change: one_day_marketcap_change.try_into()?, | ||
| seven_day_marketcap_change: seven_day_marketcap_change.try_into()?, | ||
| thirty_day_marketcap_change: thirty_day_marketcap_change.try_into()?, |
Contributor
There was a problem hiding this comment.
Not sure if unwrap_or_default is the method you want to be using here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses: #813