package components import ( "fmt" "github.com/ekzyis/zaply/lightning" ) templ Zap(inv *lightning.Invoice) {
{ inv.Description }
{ fmt.Sprintf("%.8s / %s", inv.PaymentHash, humanize(inv.Msats)) }
} func humanize(msats int64) string { sats := msats / 1000 if sats == 1 { return fmt.Sprintf("%d sat", sats) } else { return fmt.Sprintf("%d sats", sats) } }