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 41dc81ec2..2902f9eb1 100644 --- a/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js +++ b/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js @@ -571,8 +571,6 @@ async function serialSigner(path) { // noting to do here yet break } - - }, hwwPair: async function () { try { @@ -637,30 +635,36 @@ async function serialSigner(path) { .getSharedSecret(this.decryptionKey, hwwPublicKey) .slice(1, 33) - const sharedSecretHex = nobleSecp256k1.utils.bytesToHex(this.sharedSecret) - const sharedSecredHash = await nobleSecp256k1.utils.sha256(asciiToUint8Array(sharedSecretHex)) - const fingerprint = nobleSecp256k1.utils.bytesToHex(sharedSecredHash).substring(0, 5).toUpperCase() + const sharedSecretHex = nobleSecp256k1.utils.bytesToHex( + this.sharedSecret + ) + const sharedSecredHash = await nobleSecp256k1.utils.sha256( + asciiToUint8Array(sharedSecretHex) + ) + const fingerprint = nobleSecp256k1.utils + .bytesToHex(sharedSecredHash) + .substring(0, 5) + .toUpperCase() console.log('### fingerprint', fingerprint) - // + // LNbits.utils - .confirmDialog('Confirm code from display: '+fingerprint) - .onOk(() => { - this.addPairedDevice( - this.deviceId, - nobleSecp256k1.utils.bytesToHex(this.sharedSecret) - ) - - - this.$q.notify({ - type: 'positive', - message: 'Paired with device!', - timeout: 5000 - }) - }).onCancel(() => { - this.closeSerialPort() - }) + .confirmDialog('Confirm code from display: ' + fingerprint) + .onOk(() => { + this.addPairedDevice( + this.deviceId, + nobleSecp256k1.utils.bytesToHex(this.sharedSecret) + ) + this.$q.notify({ + type: 'positive', + message: 'Paired with device!', + timeout: 5000 + }) + }) + .onCancel(() => { + this.closeSerialPort() + }) }, hwwHelp: async function () { try { diff --git a/lnbits/extensions/watchonly/static/components/wallet-config/wallet-config.html b/lnbits/extensions/watchonly/static/components/wallet-config/wallet-config.html index 7b5270365..748d650df 100644 --- a/lnbits/extensions/watchonly/static/components/wallet-config/wallet-config.html +++ b/lnbits/extensions/watchonly/static/components/wallet-config/wallet-config.html @@ -1,7 +1,6 @@
-
diff --git a/lnbits/extensions/watchonly/static/js/utils.js b/lnbits/extensions/watchonly/static/js/utils.js index ccfc60e2b..d21534066 100644 --- a/lnbits/extensions/watchonly/static/js/utils.js +++ b/lnbits/extensions/watchonly/static/js/utils.js @@ -19,7 +19,6 @@ const COMMAND_CHECK_PAIRING = '/check-pairing' const DEFAULT_RECEIVE_GAP_LIMIT = 20 const PAIRING_CONTROL_TEXT = 'lnbits' - const blockTimeToDate = blockTime => blockTime ? moment(blockTime * 1000).format('LLL') : '' diff --git a/lnbits/extensions/watchonly/templates/watchonly/index.html b/lnbits/extensions/watchonly/templates/watchonly/index.html index f3ac573e3..5108da91f 100644 --- a/lnbits/extensions/watchonly/templates/watchonly/index.html +++ b/lnbits/extensions/watchonly/templates/watchonly/index.html @@ -189,7 +189,6 @@ icon="launch" type="a" :href="'https://' + mempoolHostname + '/address/' + currentAddress.address" - target="_blank" >

diff --git a/tools/conv.py b/tools/conv.py index ccde041b7..5084660ff 100644 --- a/tools/conv.py +++ b/tools/conv.py @@ -151,6 +151,7 @@ def build_insert_query(schema, tableName, columns): VALUES ({values}); """ + def to_column_type(columnType): if columnType == "TIMESTAMP": return "to_timestamp(%s)"