mirror of
https://github.com/lnbits/lnbits.git
synced 2025-03-31 16:08:42 +02:00
feat: make route hints configurable for lndrest (#2304)
* feat: make route hints configurable for lndrest boolean if route hints for private channels will be included from `LndRest` inside bolt11 invoice.
This commit is contained in:
parent
c8818f5774
commit
5b022e2ef3
@ -182,6 +182,7 @@ class LndRestFundingSource(LNbitsSettings):
|
||||
lnd_rest_cert: Optional[str] = Field(default=None)
|
||||
lnd_rest_macaroon: Optional[str] = Field(default=None)
|
||||
lnd_rest_macaroon_encrypted: Optional[str] = Field(default=None)
|
||||
lnd_rest_route_hints: bool = Field(default=True)
|
||||
lnd_cert: Optional[str] = Field(default=None)
|
||||
lnd_admin_macaroon: Optional[str] = Field(default=None)
|
||||
lnd_invoice_macaroon: Optional[str] = Field(default=None)
|
||||
|
2
lnbits/static/bundle.min.js
vendored
2
lnbits/static/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@ -50,7 +50,8 @@ Vue.component('lnbits-funding-sources', {
|
||||
lnd_rest_endpoint: 'Endpoint',
|
||||
lnd_rest_cert: 'Certificate',
|
||||
lnd_rest_macaroon: 'Macaroon',
|
||||
lnd_rest_macaroon_encrypted: 'Encrypted Macaroon'
|
||||
lnd_rest_macaroon_encrypted: 'Encrypted Macaroon',
|
||||
lnd_rest_route_hints: 'Enable Route Hints'
|
||||
}
|
||||
],
|
||||
[
|
||||
|
@ -107,7 +107,11 @@ class LndRestWallet(Wallet):
|
||||
unhashed_description: Optional[bytes] = None,
|
||||
**kwargs,
|
||||
) -> InvoiceResponse:
|
||||
data: Dict = {"value": amount, "private": True, "memo": memo or ""}
|
||||
data: Dict = {
|
||||
"value": amount,
|
||||
"private": settings.lnd_rest_route_hints,
|
||||
"memo": memo or "",
|
||||
}
|
||||
if kwargs.get("expiry"):
|
||||
data["expiry"] = kwargs["expiry"]
|
||||
if description_hash:
|
||||
|
Loading…
x
Reference in New Issue
Block a user