From 649c653836502a9cc29ec468874e2f9d3860a305 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Tue, 27 Sep 2022 17:19:32 +0300 Subject: [PATCH] fix: do not show command data in logs --- .../static/components/serial-signer/serial-signer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js b/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js index b27f2fa29..67268eebf 100644 --- a/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js +++ b/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js @@ -230,8 +230,9 @@ async function serialSigner(path) { while (true) { const {value, done} = await readStringUntil('\n') if (value) { - this.handleSerialPortResponse(value) - this.updateSerialPortConsole(value) + const {command, commandData} = await this.extractCommand(value) + this.handleSerialPortResponse(command, commandData) + this.updateSerialPortConsole(command) } if (done) return } @@ -245,8 +246,7 @@ async function serialSigner(path) { } } }, - handleSerialPortResponse: async function (value) { - const {command, commandData} = await this.extractCommand(value) + handleSerialPortResponse: async function (command, commandData) { this.logPublicCommandsResponse(command, commandData) switch (command) { @@ -287,7 +287,7 @@ async function serialSigner(path) { ) break default: - console.log(` %c${value}`, 'background: #222; color: red') + console.log(` %c${command}`, 'background: #222; color: red') } }, logPublicCommandsResponse: function (command, commandData) {