follow-up prev:
- detect payment of requests both onchain or LN - create single type of requests in GUI
This commit is contained in:
@@ -211,7 +211,8 @@ def lnencode(addr: 'LnAddr', privkey) -> str:
|
||||
route = bitstring.BitArray(pubkey) + bitstring.pack('intbe:32', feebase) + bitstring.pack('intbe:32', feerate) + bitstring.pack('intbe:16', cltv)
|
||||
data += tagged('t', route)
|
||||
elif k == 'f':
|
||||
data += encode_fallback(v, addr.net)
|
||||
if v is not None:
|
||||
data += encode_fallback(v, addr.net)
|
||||
elif k == 'd':
|
||||
# truncate to max length: 1024*5 bits = 639 bytes
|
||||
data += tagged_bytes('d', v.encode()[0:639])
|
||||
@@ -336,6 +337,9 @@ class LnAddr(object):
|
||||
def get_description(self) -> str:
|
||||
return self.get_tag('d') or ''
|
||||
|
||||
def get_fallback_address(self) -> str:
|
||||
return self.get_tag('f') or ''
|
||||
|
||||
def get_expiry(self) -> int:
|
||||
exp = self.get_tag('x')
|
||||
if exp is None:
|
||||
|
||||
Reference in New Issue
Block a user