@ecency/sdk 1.5.18 → 1.5.19

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.
@@ -877,9 +877,9 @@ declare namespace ConfigManager {
877
877
  function setImageHost(host: string): void;
878
878
  /**
879
879
  * Set DMCA filtering lists
880
- * @param accounts - DMCA lists object containing accounts/tags/posts arrays
880
+ * @param lists - DMCA lists object containing accounts/tags/posts arrays
881
881
  */
882
- function setDmcaLists(accounts?: DmcaListsInput): void;
882
+ function setDmcaLists(lists?: DmcaListsInput): void;
883
883
  }
884
884
 
885
885
  declare function makeQueryClient(): QueryClient;
@@ -216,12 +216,13 @@ var ConfigManager;
216
216
  return null;
217
217
  }
218
218
  }
219
- function setDmcaLists(accounts = {}) {
219
+ function setDmcaLists(lists = {}) {
220
220
  const coerceList = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
221
+ const input = lists || {};
221
222
  const resolved = {
222
- accounts: coerceList(accounts.accounts),
223
- tags: coerceList(accounts.tags),
224
- patterns: coerceList(accounts.posts)
223
+ accounts: coerceList(input.accounts),
224
+ tags: coerceList(input.tags),
225
+ patterns: coerceList(input.posts)
225
226
  };
226
227
  CONFIG.dmcaAccounts = resolved.accounts;
227
228
  CONFIG.dmcaTags = resolved.tags;
@@ -1848,7 +1849,7 @@ function getAccountPostsInfiniteQueryOptions(username, filter = "posts", limit =
1848
1849
  ...pageParam.permlink ? { start_permlink: pageParam.permlink } : {}
1849
1850
  };
1850
1851
  try {
1851
- if (CONFIG.dmcaAccounts.includes(username)) return [];
1852
+ if (CONFIG.dmcaAccounts && CONFIG.dmcaAccounts.includes(username)) return [];
1852
1853
  const resp = await CONFIG.hiveClient.call(
1853
1854
  "bridge",
1854
1855
  "get_account_posts",