From 2ad6d831e998934128512b020f100f2169b8b9b7 Mon Sep 17 00:00:00 2001 From: David Caseria Date: Tue, 5 Nov 2024 09:03:41 -0500 Subject: [PATCH] Add FakeWallet invoice features tag for supported payment secret (#609) --- cashu/lightning/fake.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cashu/lightning/fake.py b/cashu/lightning/fake.py index 1d3cbab..51146f1 100644 --- a/cashu/lightning/fake.py +++ b/cashu/lightning/fake.py @@ -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())