Skip to content

Commit ebbc342

Browse files
Merge pull request #474 from reown-com/chore/logcontroller
chore: removed dev check from LogController
2 parents 8ad23b3 + 9f7ca30 commit ebbc342

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

packages/appkit/src/AppKit.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,10 +686,8 @@ export class AppKit {
686686
this.setCustomWallets(options);
687687
OptionsController.setFeaturedWalletIds(options.featuredWalletIds);
688688
OptionsController.setEnableAnalytics(options.enableAnalytics);
689-
OptionsController.setDebug(options.debug && __DEV__);
689+
OptionsController.setDebug(options.debug);
690690

691-
// Initialize LogController after debug option is set
692-
LogController.initialize();
693691
LogController.sendInfo('AppKit initialization started', 'AppKit.ts', 'initControllers', {
694692
projectId: options.projectId,
695693
adapters: this.adapters.map(a => a.constructor.name),

packages/core/src/__tests__/controllers/LogController.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ describe('LogController', () => {
2525

2626
describe('Basic Logging', () => {
2727
it('should initialize correctly', () => {
28-
LogController.initialize();
2928
expect(LogController.state.logs).toEqual([]);
3029
});
3130

@@ -240,7 +239,6 @@ describe('LogController', () => {
240239
describe('Concurrent Access Patterns', () => {
241240
beforeEach(() => {
242241
LogController.clearLogs();
243-
LogController.initialize();
244242
OptionsController.setDebug(true);
245243
});
246244

@@ -365,7 +363,6 @@ describe('LogController', () => {
365363
describe('Memory Cleanup Under Load', () => {
366364
beforeEach(() => {
367365
LogController.clearLogs();
368-
LogController.initialize();
369366
OptionsController.setDebug(true);
370367
});
371368

@@ -429,7 +426,6 @@ describe('LogController', () => {
429426
describe('Malformed Error Objects', () => {
430427
beforeEach(() => {
431428
LogController.clearLogs();
432-
LogController.initialize();
433429
OptionsController.setDebug(true);
434430
});
435431

packages/core/src/controllers/LogController.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,6 @@ const logToConsole = (entry: LogEntry) => {
7272
export const LogController = {
7373
state,
7474

75-
/**
76-
* Initialize the LogController
77-
*/
78-
initialize() {
79-
// Initialize the LogController
80-
},
81-
8275
/**
8376
* Destroy the LogController (cleanup resources)
8477
*/
@@ -100,7 +93,6 @@ export const LogController = {
10093
if (!OptionsController.state.debug) {
10194
return;
10295
}
103-
10496
const entry: LogEntry = {
10597
id: generateLogId(),
10698
timestamp: Date.now(),

0 commit comments

Comments
 (0)