nip60: slight improvement to lightning melt-mint flow.

This commit is contained in:
fiatjaf
2025-01-28 23:28:13 -03:00
parent 2244740f61
commit 794561a3b3
4 changed files with 89 additions and 63 deletions

View File

@@ -18,6 +18,14 @@ type Token struct {
event *nostr.Event
}
func (t Token) ID() string {
if t.event != nil {
return t.event.ID
}
return "<not-published>"
}
func (t Token) toEvent(ctx context.Context, kr nostr.Keyer, walletId string, evt *nostr.Event) error {
pk, err := kr.GetPublicKey(ctx)
if err != nil {