feat: use single charge endpoint for balance
This commit is contained in:
parent
40f5cf77f6
commit
6da62c648a
|
@ -323,10 +323,9 @@
|
||||||
try {
|
try {
|
||||||
const {data} = await LNbits.api.request(
|
const {data} = await LNbits.api.request(
|
||||||
'GET',
|
'GET',
|
||||||
`/satspay/api/v1/charges/balance/${this.charge.id}`,
|
`/satspay/api/v1/charge/balance/${this.charge.id}`,
|
||||||
'filla'
|
'filla'
|
||||||
)
|
)
|
||||||
|
|
||||||
this.charge.time_elapsed = data.time_elapsed
|
this.charge.time_elapsed = data.time_elapsed
|
||||||
this.charge.amount = data.amount
|
this.charge.amount = data.amount
|
||||||
this.charge.balance = data.balance
|
this.charge.balance = data.balance
|
||||||
|
@ -344,8 +343,8 @@
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const utxos = await addressesAPI.getAddressTxsUtxo({
|
const utxos = await addressesAPI.getAddressTxsUtxo({
|
||||||
address: this.charge.onchainaddress
|
address: this.charge.onchainaddress
|
||||||
})
|
})
|
||||||
|
|
||||||
this.pendingFunds = utxos
|
this.pendingFunds = utxos
|
||||||
.filter(u => !u.status.confirmed)
|
.filter(u => !u.status.confirmed)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user