fix: is boltz wallet
This commit is contained in:
@@ -9,8 +9,15 @@ from loguru import logger
|
|||||||
from lnbits.wallets import get_funding_source
|
from lnbits.wallets import get_funding_source
|
||||||
|
|
||||||
funding_source = get_funding_source()
|
funding_source = get_funding_source()
|
||||||
is_boltz_wallet = funding_source.__class__.__name__ == "BoltzWallet"
|
|
||||||
print("### is_boltz_wallet", is_boltz_wallet, funding_source.__class__.__name__)
|
|
||||||
|
def is_boltz_wallet():
|
||||||
|
print(
|
||||||
|
"### funding_source.__class__.__name__",
|
||||||
|
funding_source.__class__.__name__,
|
||||||
|
)
|
||||||
|
return funding_source.__class__.__name__ == "BoltzWallet"
|
||||||
|
|
||||||
|
|
||||||
docker_lightning_cli = [
|
docker_lightning_cli = [
|
||||||
"docker",
|
"docker",
|
||||||
|
|||||||
@@ -22,12 +22,7 @@ async def test_create_invoice(from_wallet):
|
|||||||
|
|
||||||
# we cannot know the preimage of the swap yet
|
# we cannot know the preimage of the swap yet
|
||||||
funding_source = get_funding_source()
|
funding_source = get_funding_source()
|
||||||
print(
|
if not is_boltz_wallet():
|
||||||
"### funding_source.__class__.__name__",
|
|
||||||
is_boltz_wallet,
|
|
||||||
funding_source.__class__.__name__,
|
|
||||||
)
|
|
||||||
if not is_boltz_wallet:
|
|
||||||
assert payment.preimage
|
assert payment.preimage
|
||||||
|
|
||||||
invoice = decode(payment.bolt11)
|
invoice = decode(payment.bolt11)
|
||||||
@@ -49,12 +44,7 @@ async def test_create_internal_invoice(from_wallet):
|
|||||||
|
|
||||||
# we cannot know the preimage of the swap yet
|
# we cannot know the preimage of the swap yet
|
||||||
funding_source = get_funding_source()
|
funding_source = get_funding_source()
|
||||||
print(
|
if not is_boltz_wallet():
|
||||||
"### funding_source.__class__.__name__",
|
|
||||||
is_boltz_wallet,
|
|
||||||
funding_source.__class__.__name__,
|
|
||||||
)
|
|
||||||
if not is_boltz_wallet:
|
|
||||||
assert payment.preimage
|
assert payment.preimage
|
||||||
|
|
||||||
invoice = decode(payment.bolt11)
|
invoice = decode(payment.bolt11)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ async def test_services_pay_invoice(to_wallet, real_invoice):
|
|||||||
)
|
)
|
||||||
assert payment
|
assert payment
|
||||||
assert payment.memo == description
|
assert payment.memo == description
|
||||||
if not is_boltz_wallet:
|
if not is_boltz_wallet():
|
||||||
assert payment.status == PaymentState.SUCCESS
|
assert payment.status == PaymentState.SUCCESS
|
||||||
assert payment.preimage
|
assert payment.preimage
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user