chore(relay-angular-chat): bump js-waku to 0.28.1

This commit is contained in:
fryorcraken.eth 2022-09-20 11:52:58 +10:00
parent ee918a84c2
commit 10297bf818
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 11 additions and 11 deletions

View File

@ -21,7 +21,7 @@
"@angular/platform-browser": "~14.2.0",
"@angular/platform-browser-dynamic": "~14.2.0",
"@angular/router": "~14.2.0",
"js-waku": "0.28.0",
"js-waku": "0.28.1",
"protobufjs": "^7.1.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",

View File

@ -16,7 +16,7 @@ specifiers:
'@types/node': ^17.0.21
is-ci-cli: ^2.2.0
jasmine-core: ~4.3.0
js-waku: 0.28.0
js-waku: 0.28.1
karma: ~6.4.0
karma-chrome-launcher: ~3.1.0
karma-coverage: ~2.2.0
@ -37,7 +37,7 @@ dependencies:
'@angular/platform-browser': 14.2.0_afytwol7hs4qio34buyx2grhfa
'@angular/platform-browser-dynamic': 14.2.0_owch6soaoexeadly32xw5vendq
'@angular/router': 14.2.0_6lk4yxyxfaqzosenawf2bqx6vy
js-waku: 0.28.0
js-waku: 0.28.1
protobufjs: 7.1.0
rxjs: 7.5.6
tslib: 2.4.0
@ -5440,8 +5440,8 @@ packages:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
dev: true
/js-waku/0.28.0:
resolution: {integrity: sha512-MEIFugvio2IaQMQT+g+bn24BvlJ5S4PdSKD0AGVZlR7q1BhECwlpRoytyz0A/hC1+EJWhrZB8cpIAmxwtYWTBw==}
/js-waku/0.28.1:
resolution: {integrity: sha512-0h9TpV6jywyjdes8hr9tFV/5iJh3LQN3sQFYHcXyi4cK+4htNiMrCRjBSqRBtfhs/j+4tOkrht8gRJRLHdA5RA==}
engines: {node: '>=16'}
dependencies:
'@chainsafe/libp2p-gossipsub': 4.1.1

View File

@ -24,6 +24,7 @@ export class MessagesComponent implements OnInit {
messageCount: number = 0;
waku!: WakuPrivacy;
wakuStatus!: string;
deleteObserver?: () => void;
constructor(private wakuService: WakuService) {}
@ -34,18 +35,17 @@ export class MessagesComponent implements OnInit {
this.wakuService.waku.subscribe((waku) => {
this.waku = waku;
this.waku.relay.addObserver(this.processIncomingMessages, [
this.contentTopic,
]);
this.deleteObserver = this.waku.relay.addObserver(
this.processIncomingMessages,
[this.contentTopic]
);
});
window.onbeforeunload = () => this.ngOnDestroy();
}
ngOnDestroy(): void {
this.waku.relay.deleteObserver(this.processIncomingMessages, [
this.contentTopic,
]);
if (this.deleteObserver) this.deleteObserver();
}
sendMessage(): void {