feat(funding): expose allow_self_payment for LND gRPC wallet (#4080)

Co-authored-by: ai-chen2050 <1033467071@qq.com>
This commit is contained in:
Vlad Stan 2026-07-21 18:06:46 +03:00 committed by GitHub
parent 368d0f548f
commit 91c8aa77ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 2 deletions

View file

@ -597,6 +597,7 @@ class LndGrpcFundingSource(LNbitsSettings):
lnd_grpc_invoice_macaroon: str | None = Field(default=None)
lnd_grpc_macaroon: str | None = Field(default=None)
lnd_grpc_macaroon_encrypted: str | None = Field(default=None)
lnd_grpc_allow_self_payment: bool = Field(default=False)
class LnPayFundingSource(LNbitsSettings):

File diff suppressed because one or more lines are too long

View file

@ -108,7 +108,11 @@ window.app.component('lnbits-admin-funding-sources', {
lnd_grpc_macaroon: 'GRPC Macaroon',
lnd_grpc_invoice_macaroon: 'GRPC Invoice Macaroon',
lnd_grpc_admin_macaroon: 'GRPC Admin Macaroon',
lnd_grpc_macaroon_encrypted: 'Encrypted Macaroon'
lnd_grpc_macaroon_encrypted: 'Encrypted Macaroon',
lnd_grpc_allow_self_payment: {
advanced: true,
label: 'Allow Self Payment'
}
}
],
[

View file

@ -194,6 +194,7 @@ class LndWallet(Wallet):
no_inflight_updates=True,
max_parts=16,
time_pref=0.9,
allow_self_payment=settings.lnd_grpc_allow_self_payment,
)
try:
res: Payment = await self.router_rpc.SendPaymentV2(req).read()