-
Notifications
You must be signed in to change notification settings - Fork 37
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
Conversation
@@ -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), |
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.
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), |
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.
use Balance
6b7204c
to
2833a6a
Compare
[collection], | ||
); | ||
const item = useMemo(() => getRandomItemFromArray(data), [data]); | ||
const collection = Nft.getCollectionById(item.id); |
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.
Component should be observer
then
|
||
const lastSalePrice = useMemo( | ||
() => cleanNumber(parseInt(item.last_sale_price, 16) / WEI), | ||
() => cleanNumber(parseInt(item.price, 16) / WEI), |
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.
Should be Balance
instance
@@ -37,7 +35,6 @@ export const NftViewerCollectionPreviewList = ({ | |||
<FlatList | |||
data={data} | |||
numColumns={2} | |||
keyExtractor={keyExtractor} |
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.
keyExtractor
should be implemented
); | ||
|
||
return ( | ||
<SectionList |
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.
keyExtractor
should be implemented
scrollEnabled={scrollEnabled} | ||
sections={sections} | ||
keyExtractor={keyExtractor} |
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.
Missing keyExtractor
src/contexts/app.ts
Outdated
@@ -548,6 +549,7 @@ class App extends AsyncEventEmitter { | |||
|
|||
if (changed) { | |||
Token.fetchTokens(); |
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.
Token.fetchTokens(); | |
Promise.all([Token.fetchTokens(), Nft.fetchNft()]); |
properties: [ | ||
// https://github.com/quarrant/mobx-persist-store/issues/97 | ||
// @ts-ignore | ||
'nfts', |
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.
'nfts', | |
'data', |
description: item.description, | ||
created_at: item.created_at, | ||
price: '100', | ||
image: item.cached_url ?? 'https://i.ibb.co/9VGgYqf/10.jpg', |
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.
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} /> |
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.
<NftCollectionInfoBanner data={allNft} /> | |
<NftCollectionInfoBanner data={Nft.getAll()} /> |
4d4515a
to
0dd7666
Compare
0dd7666
to
5acfa73
Compare
5acfa73
to
93ffdfb
Compare
Close as old and not relevant for now |
Fixes #
Proposed Changes
Checklist