diff --git a/lnbits/extensions/watchonly/static/components/address-list/address-list.js b/lnbits/extensions/watchonly/static/components/address-list/address-list.js index 244e0472..09475bad 100644 --- a/lnbits/extensions/watchonly/static/components/address-list/address-list.js +++ b/lnbits/extensions/watchonly/static/components/address-list/address-list.js @@ -4,7 +4,13 @@ async function addressList(path) { name: 'address-list', template, - props: ['accounts', 'mempool_endpoint', 'inkey', 'sats_denominated'], + props: [ + 'data', + 'accounts', + 'mempool_endpoint', + 'inkey', + 'sats_denominated' + ], watch: { immediate: true, accounts(newVal, oldVal) { @@ -13,11 +19,19 @@ async function addressList(path) { } } }, + computed: { + addresses: { + get: function () { + return this.data + }, + set: function (value) { + this.$emit('update:data', value) + } + } + }, data: function () { return { - addresses: [], show: false, - data: [], history: [], selectedWallet: null, note: '', diff --git a/lnbits/extensions/watchonly/static/components/payment/payment.html b/lnbits/extensions/watchonly/static/components/payment/payment.html index ea66fd30..9541d8d2 100644 --- a/lnbits/extensions/watchonly/static/components/payment/payment.html +++ b/lnbits/extensions/watchonly/static/components/payment/payment.html @@ -9,7 +9,6 @@ - {{sendToList}} -
-
- -
-
- + + -
+
+
+ +
+ +
+
+ Fee: + + {{satBtc(feeValue)}} + + Fee Rate: + + {{feeRate}} sats/vbyte +
+
+
+ +
- {{feeRate}} +
+
+
+ Check & Send +
+
+
diff --git a/lnbits/extensions/watchonly/static/components/payment/payment.js b/lnbits/extensions/watchonly/static/components/payment/payment.js index e2b5d488..97254759 100644 --- a/lnbits/extensions/watchonly/static/components/payment/payment.js +++ b/lnbits/extensions/watchonly/static/components/payment/payment.js @@ -23,6 +23,7 @@ async function payment(path) { data: function () { return { + DUST_LIMIT: 546, paymentTab: 'destination', sendToList: [{address: '', amount: undefined}], changeWallet: null, diff --git a/lnbits/extensions/watchonly/static/components/send-to/send-to.js b/lnbits/extensions/watchonly/static/components/send-to/send-to.js index 93ebccc7..37e55c22 100644 --- a/lnbits/extensions/watchonly/static/components/send-to/send-to.js +++ b/lnbits/extensions/watchonly/static/components/send-to/send-to.js @@ -20,6 +20,7 @@ async function sendTo(path) { data: function () { return { + DUST_LIMIT: 546, amount: 0, paymentTable: { columns: [ diff --git a/lnbits/extensions/watchonly/static/js/index.js b/lnbits/extensions/watchonly/static/js/index.js index 6a34aaee..dcc80cc0 100644 --- a/lnbits/extensions/watchonly/static/js/index.js +++ b/lnbits/extensions/watchonly/static/js/index.js @@ -23,7 +23,6 @@ const watchOnly = async () => { mixins: [windowMixin], data: function () { return { - DUST_LIMIT: 546, filter: '', // todo: remove? scan: { @@ -832,15 +831,10 @@ const watchOnly = async () => { }, showAddressDetails: function (addressData) { this.openQrCodeDialog(addressData) - }, - handleAddressesUpdated: async function (addresses) { - this.addresses = addresses - await this.scanAddressWithAmount() } }, created: async function () { if (this.g.user.wallets.length) { - // await this.$refs.addressList.refreshAddresses() await this.scanAddressWithAmount() } } diff --git a/lnbits/extensions/watchonly/templates/watchonly/index.html b/lnbits/extensions/watchonly/templates/watchonly/index.html index 01fa4b11..77d99bba 100644 --- a/lnbits/extensions/watchonly/templates/watchonly/index.html +++ b/lnbits/extensions/watchonly/templates/watchonly/index.html @@ -79,10 +79,10 @@