diff --git a/static/js/index.js b/static/js/index.js index 471a03d..d449a34 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -323,6 +323,12 @@ window.app = Vue.createApp({ } } catch (error) { LNbits.utils.notifyApiError(error) + // Set default balance to clear loading state + this.balance = { + balance: 0, + fiat_balances: {}, + accounts: [] + } } }, async loadAllUserBalances() { @@ -382,6 +388,9 @@ window.app = Vue.createApp({ this.transactionPagination.has_prev = response.data.has_prev } catch (error) { LNbits.utils.notifyApiError(error) + // Set empty array to clear loading state + this.transactions = [] + this.transactionPagination.total = 0 } }, applyTransactionFilter() { @@ -423,6 +432,8 @@ window.app = Vue.createApp({ this.accounts = response.data } catch (error) { LNbits.utils.notifyApiError(error) + // Set empty array to clear loading state + this.accounts = [] } }, async loadCurrencies() { diff --git a/templates/castle/index.html b/templates/castle/index.html index 77c73cb..97f5ee5 100644 --- a/templates/castle/index.html +++ b/templates/castle/index.html @@ -789,9 +789,8 @@ -