fix: topup wallet was showing NaN (#2504)
* fix: topup wallet was showing NaN
This commit is contained in:
@@ -702,7 +702,14 @@ Vue.component('lnbits-update-balance', {
|
||||
LNbits.api
|
||||
.updateBalance(credit, this.wallet_id)
|
||||
.then(res => {
|
||||
this.callback({value: res, wallet_id: this.wallet_id})
|
||||
if (res.data.status !== 'Success') {
|
||||
throw new Error(res.data)
|
||||
}
|
||||
this.callback({
|
||||
success: true,
|
||||
credit: parseInt(credit),
|
||||
wallet_id: this.wallet_id
|
||||
})
|
||||
})
|
||||
.then(_ => {
|
||||
credit = parseInt(credit)
|
||||
|
||||
Reference in New Issue
Block a user