From 87f6eda206d749ba65d8a0d891dd443cd3b66a1b Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Wed, 27 Jul 2022 12:16:03 +0300 Subject: [PATCH] chore: code clean-up --- .../components/serial-signer/serial-signer.js | 2 +- .../extensions/watchonly/static/js/index.js | 45 ------------------- 2 files changed, 1 insertion(+), 46 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 944c092b..1c4dde60 100644 --- a/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js +++ b/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js @@ -12,7 +12,7 @@ async function serialSigner(path) { writer: null, readableStreamClosed: null, reader: null, - showAdvancedConfig: false, + receivedData: '', config: {}, hww: { diff --git a/lnbits/extensions/watchonly/static/js/index.js b/lnbits/extensions/watchonly/static/js/index.js index 706e265f..36f3e55f 100644 --- a/lnbits/extensions/watchonly/static/js/index.js +++ b/lnbits/extensions/watchonly/static/js/index.js @@ -21,8 +21,6 @@ const watchOnly = async () => { mixins: [windowMixin], data: function () { return { - filter: '', // todo: remove? - scan: { scanning: false, scanCount: 0, @@ -43,33 +41,6 @@ const watchOnly = async () => { show: false }, - serial: { - selectedPort: null, - writableStreamClosed: null, - writer: null, - readableStreamClosed: null, - reader: null, - showAdvancedConfig: false, - receivedData: '', - config: {} - }, - - hww: { - password: null, - showPassword: false, - mnemonic: null, - showMnemonic: false, - authenticated: false, - showPasswordDialog: false, - showWipeDialog: false, - showRestoreDialog: false, - showConsole: false, - showSignedPsbt: false, - sendingPsbt: false, - signingPsbt: false, - psbtSent: false - }, - qrCodeDialog: { show: false, data: null @@ -89,16 +60,6 @@ const watchOnly = async () => { }, methods: { - //################### CONFIG ################### - - //################### WALLETS ################### - - getWalletName: function (walletId) { - const wallet = this.walletAccounts.find(wl => wl.id === walletId) - return wallet ? wallet.title : 'unknown' - }, - //################### ADDRESSES ################### - updateAmountForAddress: async function (addressData, amount = 0) { try { const wallet = this.g.user.wallets[0] @@ -184,9 +145,6 @@ const watchOnly = async () => { el.sameTxItems = sameTxItems }) }, - showAddressHistoryDetails: function (addressHistory) { - addressHistory.expanded = true - }, //################### PAYMENT ################### @@ -355,9 +313,6 @@ const watchOnly = async () => { this[`${tab}Table`].filter = value }, - satBtc(val, showUnit = true) { - return satOrBtc(val, showUnit, this.config.data.sats_denominated) - }, updateAccounts: async function (accounts) { this.walletAccounts = accounts // await this.refreshAddressesxx() // todo: automatic now?