@ecency/sdk 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5744,6 +5744,14 @@ function useComment(username, auth) {
5744
5744
  "entry",
5745
5745
  `/@${variables.parentAuthor}/${variables.parentPermlink}`
5746
5746
  ]);
5747
+ const discussionsAuthor = variables.rootAuthor || variables.parentAuthor;
5748
+ const discussionsPermlink = variables.rootPermlink || variables.parentPermlink;
5749
+ queriesToInvalidate.push({
5750
+ predicate: (query) => {
5751
+ const key = query.queryKey;
5752
+ return Array.isArray(key) && key[0] === "posts" && key[1] === "discussions" && key[2] === discussionsAuthor && key[3] === discussionsPermlink;
5753
+ }
5754
+ });
5747
5755
  }
5748
5756
  await auth.adapter.invalidateQueries(queriesToInvalidate);
5749
5757
  }