From 8b0f7d19e59876f18a43794444f0abeb7af93d0f Mon Sep 17 00:00:00 2001 From: anon <109770337+lnproxy@users.noreply.github.com> Date: Fri, 23 Jun 2023 11:13:58 -0400 Subject: [PATCH] Allow invoices with flag 151 (electrum's optional trampoline routing) --- lnproxy.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lnproxy.go b/lnproxy.go index 435f3e2..d73792f 100644 --- a/lnproxy.go +++ b/lnproxy.go @@ -85,14 +85,15 @@ func (ms *MaybeString) UnmarshalJSON(data []byte) error { } func Wrap(r RelayParameters, x ProxyParameters, p DecodedInvoice) (*InvoiceParameters, uint64, error) { - for flag, feature := range p.Features { + for flag, _ := range p.Features { switch flag { - case "8", "9", "14", "15", "16", "17", "25", "48", "49", "149": + case "8", "9", "14", "15", "16", "17", "25", "48", "49", "149", "151": // 25 is route blinding // 48/49 is payment metadata // 148/149 is trampoline routing + // 150/151 is electrum's trampoline default: - log.Printf("unhandled feature flag: %s\n\t%v\n", flag, feature) + log.Printf("unhandled feature flag: %s\n", x.Invoice) return nil, 0, fmt.Errorf("unknown feature flag: %s", flag) } }