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

feat(HQM-171): Sync NFT with indexer data #1536

Closed
wants to merge 16 commits into from
Closed

Conversation

devkudasov
Copy link
Contributor

@devkudasov devkudasov commented Dec 10, 2023

Fixes #

Proposed Changes

Checklist

@devkudasov devkudasov requested a review from a team as a code owner December 10, 2023 15:24
@@ -21,7 +21,7 @@ export interface NftItemDetailsProps {
export const NftItemDetails = ({item, onPressSend}: NftItemDetailsProps) => {
const [imageLayout, onImageLayout] = useLayout();
const lastSalePrice = useMemo(
() => cleanNumber(parseInt(item.last_sale_price, 16) / WEI),
() => cleanNumber(parseInt(item.price, 16) / WEI),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Balance

@@ -19,7 +19,7 @@ export const NftViewerItemPreviewLarge = ({
const handlePress = useCallback(() => onPress?.(item), [onPress, item]);
const [layout, onLayout] = useLayout();
const lastSalePrice = useMemo(
() => cleanNumber(parseInt(item.last_sale_price, 16) / WEI),
() => cleanNumber(parseInt(item.price, 16) / WEI),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Balance

src/components/nft-collection-details.tsx Show resolved Hide resolved
[collection],
);
const item = useMemo(() => getRandomItemFromArray(data), [data]);
const collection = Nft.getCollectionById(item.id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Component should be observer then


const lastSalePrice = useMemo(
() => cleanNumber(parseInt(item.last_sale_price, 16) / WEI),
() => cleanNumber(parseInt(item.price, 16) / WEI),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Balance instance

@@ -37,7 +35,6 @@ export const NftViewerCollectionPreviewList = ({
<FlatList
data={data}
numColumns={2}
keyExtractor={keyExtractor}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keyExtractor should be implemented

);

return (
<SectionList
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keyExtractor should be implemented

scrollEnabled={scrollEnabled}
sections={sections}
keyExtractor={keyExtractor}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing keyExtractor

@@ -548,6 +549,7 @@ class App extends AsyncEventEmitter {

if (changed) {
Token.fetchTokens();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Token.fetchTokens();
Promise.all([Token.fetchTokens(), Nft.fetchNft()]);

properties: [
// https://github.com/quarrant/mobx-persist-store/issues/97
// @ts-ignore
'nfts',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'nfts',
'data',

description: item.description,
created_at: item.created_at,
price: '100',
image: item.cached_url ?? 'https://i.ibb.co/9VGgYqf/10.jpg',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
image: item.cached_url ?? 'https://i.ibb.co/9VGgYqf/10.jpg',
image: item.cached_url ?? DEFAULT_NFT_IMAGE

@@ -66,7 +54,7 @@ export const NftWidgetWrapper = observer(({size}: INftWidget) => {
case NftWidgetSize.large:
return (
<ShadowCard disablePadding onPress={onPress} style={styles.wrapper}>
<NftCollectionInfoBanner data={nftCollections} />
<NftCollectionInfoBanner data={allNft} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<NftCollectionInfoBanner data={allNft} />
<NftCollectionInfoBanner data={Nft.getAll()} />

@devkudasov devkudasov force-pushed the feat/nft-items branch 2 times, most recently from 4d4515a to 0dd7666 Compare December 27, 2023 10:24
@devkudasov
Copy link
Contributor Author

Close as old and not relevant for now

@devkudasov devkudasov closed this Mar 19, 2024
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

Successfully merging this pull request may close these issues.

3 participants