diff --git a/controllers/getinfo.ctrl.go b/controllers/getinfo.ctrl.go index 00a08cb..d58f9f2 100644 --- a/controllers/getinfo.ctrl.go +++ b/controllers/getinfo.ctrl.go @@ -25,7 +25,10 @@ func (controller *GetInfoController) GetInfo(c echo.Context) error { if err != nil { return err } + if controller.svc.Config.CustomName != "" { + info.Alias = controller.svc.Config.CustomName + } // BlueWallet right now requires a `identity_pubkey` in the response // https://github.com/BlueWallet/BlueWallet/blob/a28a2b96bce0bff6d1a24a951b59dc972369e490/class/wallets/lightning-custodian-wallet.js#L578 - return c.JSON(http.StatusOK, &info) + return c.JSON(http.StatusOK, info) } diff --git a/lib/service/config.go b/lib/service/config.go index 668f78f..44b4526 100644 --- a/lib/service/config.go +++ b/lib/service/config.go @@ -9,5 +9,6 @@ type Config struct { LNDAddress string `envconfig:"LND_ADDRESS" required:"true"` LNDMacaroonHex string `envconfig:"LND_MACAROON_HEX" required:"true"` LNDCertHex string `envconfig:"LND_CERT_HEX"` + CustomName string `envconfig:"CUSTOM_NAME"` Port int `envconfig:"PORT" default:"3000"` }