mirror of
https://github.com/fusion44/blitz_api.git
synced 2026-08-13 11:52:45 +02:00
fix: don't assume that there is a bolt11 string
On keysend payments there usually is no bolt11 string. refs #125
This commit is contained in:
parent
97c51da630
commit
100bb80b17
1 changed files with 8 additions and 6 deletions
|
|
@ -222,12 +222,14 @@ async def list_all_tx_impl(
|
|||
for pay in res[2].pays:
|
||||
comment = ""
|
||||
|
||||
if pay.bolt11 in memo_cache:
|
||||
comment = memo_cache[pay.bolt11]
|
||||
else:
|
||||
pr = await decode_pay_request_impl(pay.bolt11)
|
||||
comment = pr.description
|
||||
memo_cache[pay.bolt11] = pr.description
|
||||
if pay.bolt11 is not None and len(pay.bolt11) > 0:
|
||||
if pay.bolt11 in memo_cache:
|
||||
comment = memo_cache[pay.bolt11]
|
||||
else:
|
||||
pr = await decode_pay_request_impl(pay.bolt11)
|
||||
comment = pr.description
|
||||
memo_cache[pay.bolt11] = pr.description
|
||||
|
||||
p = GenericTx.from_cln_grpc_payment(pay, comment)
|
||||
|
||||
if successful_only and p.status == TxStatus.SUCCEEDED:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue