fix: change address

This commit is contained in:
Vlad Stan
2022-08-03 13:50:07 +03:00
parent c76644c561
commit dc95143998
5 changed files with 125 additions and 102 deletions
+1 -17
View File
@@ -117,6 +117,7 @@ const watchOnly = async () => {
}
}
// todo: account deleted
await LNbits.api.request(
'PUT',
`/watchonly/api/v1/address/${addressData.id}`,
@@ -194,16 +195,10 @@ const watchOnly = async () => {
initPaymentData: async function () {
if (!this.payment.show) return
await this.$refs.addressList.refreshAddresses()
this.payment.showAdvanced = false
this.payment.changeWallet = this.walletAccounts[0]
this.selectChangeAddress(this.payment.changeWallet)
},
goToPaymentView: async function () {
// this.payment.show = true
this.showPayment = true
// this.tab = 'utxos'
await this.initPaymentData()
},
@@ -834,17 +829,6 @@ const watchOnly = async () => {
this.walletAccounts = accounts
// await this.refreshAddressesxx() // todo: automatic now?
await this.scanAddressWithAmount()
if (this.payment.changeWallet) {
const changeAccount = this.walletAccounts.find(
w => w.id === this.payment.changeWallet.id
)
// change account deleted
if (!changeAccount) {
this.payment.changeWallet = this.walletAccounts[0]
this.selectChangeAddress(this.payment.changeWallet)
}
}
},
showAddressDetails: function (addressData) {
this.openQrCodeDialog(addressData)