mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-22 15:57:28 +02:00
Fixed balance update not showing properly
This commit is contained in:
@@ -185,6 +185,7 @@ new Vue({
|
|||||||
location: window.location
|
location: window.location
|
||||||
},
|
},
|
||||||
balance: 0,
|
balance: 0,
|
||||||
|
credit: 0,
|
||||||
newName: ''
|
newName: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -249,11 +250,11 @@ new Vue({
|
|||||||
this.parse.data.paymentChecker = null
|
this.parse.data.paymentChecker = null
|
||||||
this.parse.camera.show = false
|
this.parse.camera.show = false
|
||||||
},
|
},
|
||||||
updateBalance: function(scopeValue){
|
updateBalance: function(credit){
|
||||||
LNbits.api
|
LNbits.api
|
||||||
.request(
|
.request(
|
||||||
'PUT',
|
'PUT',
|
||||||
'/api/v1/wallet/balance/' + scopeValue,
|
'/api/v1/wallet/balance/' + credit,
|
||||||
this.g.wallet.inkey
|
this.g.wallet.inkey
|
||||||
)
|
)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
@@ -25,14 +25,14 @@
|
|||||||
icon="add"
|
icon="add"
|
||||||
size="md"
|
size="md"
|
||||||
>
|
>
|
||||||
<q-popup-edit class="bg-accent text-white" v-slot="scope">
|
<q-popup-edit class="bg-accent text-white">
|
||||||
<q-input
|
<q-input
|
||||||
label="Amount to credit account"
|
label="Amount to credit account"
|
||||||
v-model="scope.value"
|
v-model="credit"
|
||||||
dense
|
dense
|
||||||
autofocus
|
autofocus
|
||||||
type="number"
|
type="number"
|
||||||
@keyup.enter="updateBalance(scope.value)"
|
@keyup.enter="updateBalance(credit)"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="edit" />
|
<q-icon name="edit" />
|
||||||
|
@@ -92,7 +92,7 @@ async def api_update_balance(
|
|||||||
return {
|
return {
|
||||||
"id": wallet.wallet.id,
|
"id": wallet.wallet.id,
|
||||||
"name": wallet.wallet.name,
|
"name": wallet.wallet.name,
|
||||||
"balance": wallet.wallet.balance_msat + amount,
|
"balance": amount,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user