From d6092f8aa3449daea44c503f17a899cf0733b609 Mon Sep 17 00:00:00 2001 From: IsaccoSordo Date: Tue, 6 Aug 2024 16:59:37 +0200 Subject: [PATCH] fix: listener --- packages/beacon-transport-libp2p/package.json | 2 +- packages/beacon-transport-libp2p/src/WebSocketP2PTransport.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/beacon-transport-libp2p/package.json b/packages/beacon-transport-libp2p/package.json index e0f93bbbe..0b11f6c49 100644 --- a/packages/beacon-transport-libp2p/package.json +++ b/packages/beacon-transport-libp2p/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-transport-libp2p", - "version": "4.2.23", + "version": "4.2.25", "description": "This package contains methods to facilitate communication over the Beacon network, a decentralised P2P network that is based on the matrix protocol.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", diff --git a/packages/beacon-transport-libp2p/src/WebSocketP2PTransport.ts b/packages/beacon-transport-libp2p/src/WebSocketP2PTransport.ts index 5c169a379..0e27af09e 100644 --- a/packages/beacon-transport-libp2p/src/WebSocketP2PTransport.ts +++ b/packages/beacon-transport-libp2p/src/WebSocketP2PTransport.ts @@ -20,7 +20,7 @@ export class WebSocketP2PTransport< constructor( name: string, keyPair: KeyPair, - pkHash: string, + private pkHash: string, storage: Storage, storageKey: K, urls: string[] = DEFAULT_NODES @@ -34,6 +34,7 @@ export class WebSocketP2PTransport< async connect() { await this.client.connect() + await this.listen(this.pkHash) return super.connect() }