@ecency/sdk 1.5.7 → 1.5.9

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.
@@ -43,6 +43,20 @@ function useBroadcastMutation(mutationKey = [], username, operations, onSuccess
43
43
  }
44
44
  });
45
45
  }
46
+ var isDevelopment = (() => {
47
+ try {
48
+ return process.env?.NODE_ENV === "development";
49
+ } catch {
50
+ return false;
51
+ }
52
+ })();
53
+ var getHeliusApiKey = () => {
54
+ try {
55
+ return process.env?.VITE_HELIUS_API_KEY;
56
+ } catch {
57
+ return void 0;
58
+ }
59
+ };
46
60
  var CONFIG = {
47
61
  privateApiHost: "https://ecency.com",
48
62
  imageHost: "https://images.ecency.com",
@@ -66,7 +80,7 @@ var CONFIG = {
66
80
  consoleOnFailover: true
67
81
  }
68
82
  ),
69
- heliusApiKey: process.env.VITE_HELIUS_API_KEY,
83
+ heliusApiKey: getHeliusApiKey(),
70
84
  queryClient: new QueryClient(),
71
85
  plausibleHost: "https://pl.ecency.com",
72
86
  spkNode: "https://spk.good-karma.xyz",
@@ -158,7 +172,6 @@ var ConfigManager;
158
172
  return { safe: true };
159
173
  }
160
174
  function safeCompileRegex(pattern, maxLength = 200) {
161
- const isDevelopment = typeof process !== "undefined" && process.env?.NODE_ENV === "development";
162
175
  try {
163
176
  if (!pattern) {
164
177
  if (isDevelopment) {
@@ -210,7 +223,6 @@ var ConfigManager;
210
223
  CONFIG.dmcaTagRegexes = tags.map((pattern) => safeCompileRegex(pattern)).filter((r) => r !== null);
211
224
  CONFIG.dmcaPatternRegexes = [];
212
225
  const rejectedTagCount = tags.length - CONFIG.dmcaTagRegexes.length;
213
- const isDevelopment = typeof process !== "undefined" && process.env?.NODE_ENV === "development";
214
226
  if (!CONFIG._dmcaInitialized && isDevelopment) {
215
227
  console.log(`[SDK] DMCA configuration loaded:`);
216
228
  console.log(` - Accounts: ${accounts.length}`);