@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.
@@ -68,6 +68,20 @@ function useBroadcastMutation(mutationKey = [], username, operations, onSuccess
68
68
  }
69
69
  });
70
70
  }
71
+ var isDevelopment = (() => {
72
+ try {
73
+ return process.env?.NODE_ENV === "development";
74
+ } catch {
75
+ return false;
76
+ }
77
+ })();
78
+ var getHeliusApiKey = () => {
79
+ try {
80
+ return process.env?.VITE_HELIUS_API_KEY;
81
+ } catch {
82
+ return void 0;
83
+ }
84
+ };
71
85
  var CONFIG = {
72
86
  privateApiHost: "https://ecency.com",
73
87
  imageHost: "https://images.ecency.com",
@@ -91,7 +105,7 @@ var CONFIG = {
91
105
  consoleOnFailover: true
92
106
  }
93
107
  ),
94
- heliusApiKey: process.env.VITE_HELIUS_API_KEY,
108
+ heliusApiKey: getHeliusApiKey(),
95
109
  queryClient: new reactQuery.QueryClient(),
96
110
  plausibleHost: "https://pl.ecency.com",
97
111
  spkNode: "https://spk.good-karma.xyz",
@@ -183,7 +197,6 @@ exports.ConfigManager = void 0;
183
197
  return { safe: true };
184
198
  }
185
199
  function safeCompileRegex(pattern, maxLength = 200) {
186
- const isDevelopment = typeof process !== "undefined" && process.env?.NODE_ENV === "development";
187
200
  try {
188
201
  if (!pattern) {
189
202
  if (isDevelopment) {
@@ -235,7 +248,6 @@ exports.ConfigManager = void 0;
235
248
  CONFIG.dmcaTagRegexes = tags.map((pattern) => safeCompileRegex(pattern)).filter((r) => r !== null);
236
249
  CONFIG.dmcaPatternRegexes = [];
237
250
  const rejectedTagCount = tags.length - CONFIG.dmcaTagRegexes.length;
238
- const isDevelopment = typeof process !== "undefined" && process.env?.NODE_ENV === "development";
239
251
  if (!CONFIG._dmcaInitialized && isDevelopment) {
240
252
  console.log(`[SDK] DMCA configuration loaded:`);
241
253
  console.log(` - Accounts: ${accounts.length}`);