followup f5a8cc7076
This commit is contained in:
@@ -11,7 +11,7 @@ from typing import TYPE_CHECKING, Optional
|
|||||||
|
|
||||||
import electrum
|
import electrum
|
||||||
from electrum.gui import BaseElectrumGui
|
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 format_satoshis, format_time
|
||||||
from electrum.util import EventListener, event_listener
|
from electrum.util import EventListener, event_listener
|
||||||
from electrum.bitcoin import is_address, address_to_script, COIN
|
from electrum.bitcoin import is_address, address_to_script, COIN
|
||||||
@@ -32,12 +32,14 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
_ = lambda x:x # i18n
|
_ = lambda x:x # i18n
|
||||||
|
|
||||||
|
|
||||||
def parse_bip21(text):
|
def parse_bip21(text):
|
||||||
try:
|
try:
|
||||||
return util.parse_URI(text)
|
return parse_bip21_URI(text)
|
||||||
except Exception:
|
except Exception:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
def parse_bolt11(text):
|
def parse_bolt11(text):
|
||||||
from electrum.lnaddr import lndecode
|
from electrum.lnaddr import lndecode
|
||||||
try:
|
try:
|
||||||
@@ -46,7 +48,6 @@ def parse_bolt11(text):
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ElectrumGui(BaseElectrumGui, EventListener):
|
class ElectrumGui(BaseElectrumGui, EventListener):
|
||||||
|
|
||||||
def __init__(self, *, config: 'SimpleConfig', daemon: 'Daemon', plugins: 'Plugins'):
|
def __init__(self, *, config: 'SimpleConfig', daemon: 'Daemon', plugins: 'Plugins'):
|
||||||
|
|||||||
Reference in New Issue
Block a user