Add FakeWallet invoice features tag for supported payment secret (#609)

This commit is contained in:
David Caseria
2024-11-05 09:03:41 -05:00
committed by GitHub
parent 0de574e006
commit 2ad6d831e9

View File

@@ -7,6 +7,9 @@ from typing import AsyncGenerator, Dict, List, Optional
from bolt11 import (
Bolt11,
Feature,
FeatureState,
Features,
MilliSatoshi,
TagChar,
Tags,
@@ -90,6 +93,7 @@ class FakeWallet(LightningBackend):
) -> InvoiceResponse:
self.assert_unit_supported(amount.unit)
tags = Tags()
tags.add(TagChar.features, Features.from_feature_list({Feature.payment_secret: FeatureState.supported}))
if description_hash:
tags.add(TagChar.description_hash, description_hash.hex())