feat: improve on create wallet frontend and api. (BREAKING CHANGE) (#3635)

This commit is contained in:
dni ⚡
2025-12-08 11:09:43 +01:00
committed by GitHub
parent 3af3838995
commit 5f86627eae
13 changed files with 101 additions and 71 deletions
+4 -6
View File
@@ -129,14 +129,12 @@ window._lnbitsApi = {
getWallet(wallet) {
return this.request('get', '/api/v1/wallet', wallet.inkey)
},
createWallet(wallet, name, walletType, ops = {}) {
return this.request('post', '/api/v1/wallet', wallet.adminkey, {
createWallet(name, walletType, opts = {}) {
return this.request('post', '/api/v1/wallet', null, {
name: name,
wallet_type: walletType,
...ops
}).then(res => {
window.location = '/wallet?wal=' + res.data.id
})
...opts
}).catch(LNbits.utils.notifyApiError)
},
updateWallet(name, wallet) {
return this.request('patch', '/api/v1/wallet', wallet.adminkey, {