|
|
|
|
@ -11,7 +11,7 @@ from typing import TYPE_CHECKING, Optional
|
|
|
|
|
|
|
|
|
|
import electrum |
|
|
|
|
from electrum.gui import BaseElectrumGui |
|
|
|
|
from electrum import util |
|
|
|
|
from electrum.bip21 import parse_bip21_URI |
|
|
|
|
from electrum.util import format_satoshis, format_time |
|
|
|
|
from electrum.util import EventListener, event_listener |
|
|
|
|
from electrum.bitcoin import is_address, address_to_script, COIN |
|
|
|
|
@ -32,12 +32,14 @@ if TYPE_CHECKING:
|
|
|
|
|
|
|
|
|
|
_ = lambda x:x # i18n |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def parse_bip21(text): |
|
|
|
|
try: |
|
|
|
|
return util.parse_URI(text) |
|
|
|
|
return parse_bip21_URI(text) |
|
|
|
|
except Exception: |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def parse_bolt11(text): |
|
|
|
|
from electrum.lnaddr import lndecode |
|
|
|
|
try: |
|
|
|
|
@ -46,7 +48,6 @@ def parse_bolt11(text):
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ElectrumGui(BaseElectrumGui, EventListener): |
|
|
|
|
|
|
|
|
|
def __init__(self, *, config: 'SimpleConfig', daemon: 'Daemon', plugins: 'Plugins'): |
|
|
|
|
|