mirror of
https://github.com/lnbits/lnbits.git
synced 2025-07-28 13:42:42 +02:00
chore: format code
This commit is contained in:
@@ -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 {
|
||||
|
@@ -1,7 +1,6 @@
|
||||
<div>
|
||||
<q-card>
|
||||
<div class="row items-center no-wrap q-mb-md">
|
||||
|
||||
<div class="col-md-2 col-xs-4 q-ml-lg">
|
||||
<q-btn unelevated @click="show = true" color="primary" icon="settings">
|
||||
</q-btn>
|
||||
|
@@ -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') : ''
|
||||
|
||||
|
@@ -189,7 +189,6 @@
|
||||
icon="launch"
|
||||
type="a"
|
||||
:href="'https://' + mempoolHostname + '/address/' + currentAddress.address"
|
||||
|
||||
target="_blank"
|
||||
></q-btn>
|
||||
</p>
|
||||
|
@@ -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)"
|
||||
|
Reference in New Issue
Block a user