fix: accept soft deleted wallets (#3179)

This commit is contained in:
Vlad Stan
2025-05-30 18:48:23 +03:00
committed by GitHub
parent 27fd510142
commit 63e728710d
5 changed files with 74 additions and 15 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+3
View File
@@ -308,6 +308,9 @@ window.localisation.en = {
login_with_user_id: 'Login with user ID',
or: 'or',
create_new_wallet: 'Create New Wallet',
delete_all_wallets: 'Delete All Wallets',
confirm_delete_all_wallets:
'Are you sure you want to delete ALL wallets for this user?',
login_to_account: 'Login to your account',
create_account: 'Create account',
account_settings: 'Account Settings',
+17
View File
@@ -312,6 +312,23 @@ window.UsersPageLogic = {
.catch(LNbits.utils.notifyApiError)
})
},
deleteAllUserWallets(userId) {
LNbits.utils
.confirmDialog(this.$t('confirm_delete_all_wallets'))
.onOk(() => {
LNbits.api
.request('DELETE', `/users/api/v1/user/${userId}/wallets`)
.then(response => {
Quasar.Notify.create({
type: 'positive',
message: response.data.message,
icon: null
})
this.fetchWallets(userId)
})
.catch(LNbits.utils.notifyApiError)
})
},
copyWalletLink(walletId) {
const url = `${window.location.origin}/wallet?usr=${this.activeWallet.userId}&wal=${walletId}`
this.copyText(url)