@@ -13,6 +13,7 @@ import (
1313 "time"
1414
1515 "github.com/improbable-eng/grpc-web/go/grpcweb"
16+ "github.com/lightninglabs/lightning-terminal/session"
1617 "github.com/lightningnetwork/lnd/lncfg"
1718 "github.com/lightningnetwork/lnd/macaroons"
1819 grpcProxy "github.com/mwitkow/grpc-proxy/proxy"
@@ -64,6 +65,7 @@ func (e *proxyErr) Unwrap() error {
6465// or REST request and delegate (and convert if necessary) it to the correct
6566// component.
6667func newRpcProxy (cfg * Config , validator macaroons.MacaroonValidator ,
68+ superMacValidator session.SuperMacaroonValidator ,
6769 permissionMap map [string ][]bakery.Op ,
6870 bufListener * bufconn.Listener ) * rpcProxy {
6971
@@ -80,10 +82,11 @@ func newRpcProxy(cfg *Config, validator macaroons.MacaroonValidator,
8082 // need to be addressed with a custom director that just takes care of a
8183 // few HTTP header fields.
8284 p := & rpcProxy {
83- cfg : cfg ,
84- basicAuth : basicAuth ,
85- macValidator : validator ,
86- bufListener : bufListener ,
85+ cfg : cfg ,
86+ basicAuth : basicAuth ,
87+ macValidator : validator ,
88+ superMacValidator : superMacValidator ,
89+ bufListener : bufListener ,
8790 }
8891 p .grpcServer = grpc .NewServer (
8992 // From the grpxProxy doc: This codec is *crucial* to the
@@ -156,8 +159,9 @@ type rpcProxy struct {
156159 cfg * Config
157160 basicAuth string
158161
159- macValidator macaroons.MacaroonValidator
160- bufListener * bufconn.Listener
162+ macValidator macaroons.MacaroonValidator
163+ superMacValidator session.SuperMacaroonValidator
164+ bufListener * bufconn.Listener
161165
162166 superMacaroon string
163167
0 commit comments