Skip to content

Commit

Permalink
wallet - method to get mint quote state
Browse files Browse the repository at this point in the history
  • Loading branch information
elnosh committed Aug 13, 2024
1 parent 27f8ea2 commit f9acb62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,17 @@ func (w *Wallet) RequestMint(amount uint64) (*nut04.PostMintQuoteBolt11Response,
return mintResponse, nil
}

func (w *Wallet) MintQuoteState(quoteId string) (*nut04.PostMintQuoteBolt11Response, error) {
return GetMintQuoteState(w.currentMint.mintURL, quoteId)
}

// MintTokens will check whether if the mint quote has been paid.
// If yes, it will create blinded messages that will send to the mint
// to get the blinded signatures.
// If successful, it will unblind the signatures to generate proofs
// and store the proofs in the db.
func (w *Wallet) MintTokens(quoteId string) (cashu.Proofs, error) {
mintQuote, err := GetMintQuoteState(w.currentMint.mintURL, quoteId)
mintQuote, err := w.MintQuoteState(quoteId)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit f9acb62

Please sign in to comment.