mobile: authenticate with rpc server

This makes the mobile bindings work with TLS and macaroons enabled,
which is supported from falafel 0.6.
This commit is contained in:
Johan T. Halseth 2019-12-02 13:26:06 +01:00
parent 200161e04c
commit 5be6e1c92e
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

View File

@ -79,6 +79,19 @@ func Start(extraArgs string, unlockerReady, rpcReady Callback) {
go func() {
<-rpcListening
// Now that the RPC server is ready, we can get the needed
// authentication options, and add them to the global dial
// options.
auth, err := lnd.AdminAuthOptions()
if err != nil {
rpcReady.OnError(err)
return
}
// Add the auth options to the listener's dial options.
addLightningLisDialOption(auth...)
rpcReady.OnResponse([]byte{})
}()
}