chore: format code

This commit is contained in:
Vlad Stan 2022-08-19 08:51:57 +03:00
parent fb7030c30f
commit 713909292e
5 changed files with 27 additions and 25 deletions

View file

@ -571,8 +571,6 @@ async function serialSigner(path) {
// noting to do here yet // noting to do here yet
break break
} }
}, },
hwwPair: async function () { hwwPair: async function () {
try { try {
@ -637,9 +635,16 @@ async function serialSigner(path) {
.getSharedSecret(this.decryptionKey, hwwPublicKey) .getSharedSecret(this.decryptionKey, hwwPublicKey)
.slice(1, 33) .slice(1, 33)
const sharedSecretHex = nobleSecp256k1.utils.bytesToHex(this.sharedSecret) const sharedSecretHex = nobleSecp256k1.utils.bytesToHex(
const sharedSecredHash = await nobleSecp256k1.utils.sha256(asciiToUint8Array(sharedSecretHex)) this.sharedSecret
const fingerprint = nobleSecp256k1.utils.bytesToHex(sharedSecredHash).substring(0, 5).toUpperCase() )
const sharedSecredHash = await nobleSecp256k1.utils.sha256(
asciiToUint8Array(sharedSecretHex)
)
const fingerprint = nobleSecp256k1.utils
.bytesToHex(sharedSecredHash)
.substring(0, 5)
.toUpperCase()
console.log('### fingerprint', fingerprint) console.log('### fingerprint', fingerprint)
// //
@ -651,16 +656,15 @@ async function serialSigner(path) {
nobleSecp256k1.utils.bytesToHex(this.sharedSecret) nobleSecp256k1.utils.bytesToHex(this.sharedSecret)
) )
this.$q.notify({ this.$q.notify({
type: 'positive', type: 'positive',
message: 'Paired with device!', message: 'Paired with device!',
timeout: 5000 timeout: 5000
}) })
}).onCancel(() => { })
.onCancel(() => {
this.closeSerialPort() this.closeSerialPort()
}) })
}, },
hwwHelp: async function () { hwwHelp: async function () {
try { try {

View file

@ -1,7 +1,6 @@
<div> <div>
<q-card> <q-card>
<div class="row items-center no-wrap q-mb-md"> <div class="row items-center no-wrap q-mb-md">
<div class="col-md-2 col-xs-4 q-ml-lg"> <div class="col-md-2 col-xs-4 q-ml-lg">
<q-btn unelevated @click="show = true" color="primary" icon="settings"> <q-btn unelevated @click="show = true" color="primary" icon="settings">
</q-btn> </q-btn>

View file

@ -19,7 +19,6 @@ const COMMAND_CHECK_PAIRING = '/check-pairing'
const DEFAULT_RECEIVE_GAP_LIMIT = 20 const DEFAULT_RECEIVE_GAP_LIMIT = 20
const PAIRING_CONTROL_TEXT = 'lnbits' const PAIRING_CONTROL_TEXT = 'lnbits'
const blockTimeToDate = blockTime => const blockTimeToDate = blockTime =>
blockTime ? moment(blockTime * 1000).format('LLL') : '' blockTime ? moment(blockTime * 1000).format('LLL') : ''

View file

@ -189,7 +189,6 @@
icon="launch" icon="launch"
type="a" type="a"
:href="'https://' + mempoolHostname + '/address/' + currentAddress.address" :href="'https://' + mempoolHostname + '/address/' + currentAddress.address"
target="_blank" target="_blank"
></q-btn> ></q-btn>
</p> </p>

View file

@ -151,6 +151,7 @@ def build_insert_query(schema, tableName, columns):
VALUES ({values}); VALUES ({values});
""" """
def to_column_type(columnType): def to_column_type(columnType):
if columnType == "TIMESTAMP": if columnType == "TIMESTAMP":
return "to_timestamp(%s)" return "to_timestamp(%s)"