Fix logger reference error in Libp2pComponent
Add missing LoggerComponent import that was causing ReferenceError when trying to use logger in start() method
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { NativeEventEmitter, NativeModules } from 'react-native';
|
import { NativeEventEmitter, NativeModules } from 'react-native';
|
||||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
|
import { LoggerComponent } from 'ior:gitea:gitea.metatrom.net:universal-components/logger@1.0.0';
|
||||||
import { LIBP2P_CONFIG } from '../utils/constants';
|
import { LIBP2P_CONFIG } from '../utils/constants';
|
||||||
import type { ConnectionStatusEvent, PeerDiscoveredEvent, PeerInfoEvent } from '../utils/types';
|
import type { ConnectionStatusEvent, PeerDiscoveredEvent, PeerInfoEvent } from '../utils/types';
|
||||||
import type {
|
import type {
|
||||||
@@ -16,6 +17,9 @@ import type {
|
|||||||
PeerInfo,
|
PeerInfo,
|
||||||
} from '../interfaces/ILibp2pComponent';
|
} from '../interfaces/ILibp2pComponent';
|
||||||
|
|
||||||
|
// Create logger instance for this module
|
||||||
|
const logger = new LoggerComponent('Libp2pComponent');
|
||||||
|
|
||||||
// Helper class to create PeerId-like objects from strings
|
// Helper class to create PeerId-like objects from strings
|
||||||
export class SimplePeerId implements PeerId {
|
export class SimplePeerId implements PeerId {
|
||||||
constructor(private id: string) {}
|
constructor(private id: string) {}
|
||||||
|
|||||||
Reference in New Issue
Block a user