prevent issue with sending payments using cashu when mint is not loaded

This commit is contained in:
Danny Morabito 2025-07-09 17:53:24 +02:00
parent 2d858727b0
commit ce01791cbf
Signed by: dannym
GPG key ID: 7CC8056A5A04557E

View file

@ -66,6 +66,7 @@ export default class PortalBtcWalletCashu {
} }
async meltProofsToPayInvoice(invoice: string) { async meltProofsToPayInvoice(invoice: string) {
await this.cashuWallet.loadMint();
const meltQuote = await this.cashuWallet.createMeltQuote(invoice); const meltQuote = await this.cashuWallet.createMeltQuote(invoice);
const amountToMelt = meltQuote.amount + meltQuote.fee_reserve; const amountToMelt = meltQuote.amount + meltQuote.fee_reserve;
const { keep, send } = await this.cashuWallet.send( const { keep, send } = await this.cashuWallet.send(