mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 14:51:05 +01:00
remove error fallback
This commit is contained in:
parent
0822058661
commit
370ec7e366
1 changed files with 1 additions and 6 deletions
|
@ -9,7 +9,6 @@ import secp256k1
|
||||||
from bech32 import CHARSET, bech32_decode, bech32_encode
|
from bech32 import CHARSET, bech32_decode, bech32_encode
|
||||||
from ecdsa import SECP256k1, VerifyingKey
|
from ecdsa import SECP256k1, VerifyingKey
|
||||||
from ecdsa.util import sigdecode_string
|
from ecdsa.util import sigdecode_string
|
||||||
from loguru import logger
|
|
||||||
|
|
||||||
|
|
||||||
class Route(NamedTuple):
|
class Route(NamedTuple):
|
||||||
|
@ -168,10 +167,6 @@ def encode(options):
|
||||||
return lnencode(addr, options["privkey"])
|
return lnencode(addr, options["privkey"])
|
||||||
|
|
||||||
|
|
||||||
def encode_fallback(v, currency):
|
|
||||||
logger.error(f"hit bolt11.py encode_fallback with v: {v} and currency: {currency}")
|
|
||||||
|
|
||||||
|
|
||||||
def lnencode(addr, privkey):
|
def lnencode(addr, privkey):
|
||||||
if addr.amount:
|
if addr.amount:
|
||||||
amount = Decimal(str(addr.amount))
|
amount = Decimal(str(addr.amount))
|
||||||
|
@ -214,7 +209,7 @@ def lnencode(addr, privkey):
|
||||||
)
|
)
|
||||||
data += tagged("r", route)
|
data += tagged("r", route)
|
||||||
elif k == "f":
|
elif k == "f":
|
||||||
data += encode_fallback(v, addr.currency)
|
continue
|
||||||
elif k == "d":
|
elif k == "d":
|
||||||
data += tagged_bytes("d", v.encode())
|
data += tagged_bytes("d", v.encode())
|
||||||
elif k == "x":
|
elif k == "x":
|
||||||
|
|
Loading…
Add table
Reference in a new issue