Merge pull request #3981 from mempool/mononaut/fix-websocket-null-data

Fix websocket null data for undefined rbfSummary
This commit is contained in:
softsimon 2023-07-17 19:10:05 +09:00 committed by GitHub
commit c355602924
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -229,7 +229,9 @@ class WebsocketHandler {
if (parsedMessage && parsedMessage['track-rbf-summary'] != null) {
if (parsedMessage['track-rbf-summary']) {
client['track-rbf-summary'] = true;
response['rbfLatestSummary'] = this.socketData['rbfSummary'];
if (this.socketData['rbfSummary'] != null) {
response['rbfLatestSummary'] = this.socketData['rbfSummary'];
}
} else {
client['track-rbf-summary'] = false;
}