-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add new events support to refresh cache when changes happen #1084
Add new events support to refresh cache when changes happen #1084
Conversation
const collectionUpdateInfo = await this.mxApiService.getCollectionByIdentifierForQuery(updateTopics.collection, 'fields=name,type'); | ||
if (collectionUpdateInfo?.type === NftTypeEnum.NonFungibleESDT || collectionUpdateInfo?.type === NftTypeEnum.SemiFungibleESDT) { | ||
await this.triggerCacheInvalidation( | ||
`${updateTopics.collection}-${updateTopics.nonce}`, |
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.
Double check: nonce is here as hex (not number), correct?
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.
yes
@@ -18,7 +18,7 @@ export class ElasiticUpdatesConsumer { | |||
const mintNftEvents = events?.events?.filter((e: { identifier: NftEventEnum }) => e.identifier === NftEventEnum.ESDTNFTCreate); | |||
const burnAndUpdateNftAttributesEvents = events?.events?.filter( | |||
(e: { identifier: NftEventEnum }) => | |||
e.identifier === NftEventEnum.ESDTNFTBurn || e.identifier === NftEventEnum.ESDTNFTUpdateAttributes, | |||
e.identifier === NftEventEnum.ESDTNFTBurn || e.identifier === NftEventEnum.ESDTNFTUpdateAttributes || e.identifier === NftEventEnum.ESDTMetaDataUpdate || e.identifier === NftEventEnum.ESDTMetaDataRecreate, |
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.
Can have a collection of identifiers of interest, then do: arr.includes(value)
. Though, if this approach is used in other places, keep it for consistency.
No description provided.