fix: correct LNBits newFunding return format for funding page
Updates the newFunding function to return the expected interface: - fundingPendingBalance: BN(0) for Lightning Network - fundingConfirmedBalance: actual wallet balance as BN object - fundingAddress: bolt11 invoice for funding This fixes the TypeError "Cannot read properties of undefined (reading 'minus')" that occurred when accessing the funding page in the admin UI.
This commit is contained in:
parent
c96df3af1e
commit
8c5f78c50f
1 changed files with 3 additions and 4 deletions
|
|
@ -221,10 +221,9 @@ async function newFunding(account, cryptoCode) {
|
|||
const [walletBalance, fundingAddress] = await Promise.all(promises)
|
||||
|
||||
return {
|
||||
fundingAddress,
|
||||
fundingAddressQr: fundingAddress,
|
||||
confirmed: walletBalance.gte(0),
|
||||
confirmedBalance: walletBalance.toString()
|
||||
fundingPendingBalance: new BN(0),
|
||||
fundingConfirmedBalance: walletBalance,
|
||||
fundingAddress
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue