electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit a98fd14f8d9b9c1d17fd6c25d58cc4b72a6fd8b4
parent 2be2a510fff02ef30c74749d30f741a61834f186
Author: SomberNight <somber.night@protonmail.com>
Date:   Thu, 18 Jun 2020 19:58:23 +0200

qt swap_dialog: clean-up imports

Diffstat:
Melectrum/gui/qt/swap_dialog.py | 27++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/electrum/gui/qt/swap_dialog.py b/electrum/gui/qt/swap_dialog.py @@ -1,26 +1,18 @@ -from PyQt5 import QtCore, QtGui -from PyQt5.QtCore import Qt -from PyQt5.QtWidgets import (QMenu, QHBoxLayout, QLabel, QVBoxLayout, QGridLayout, QLineEdit, - QPushButton, QAbstractItemView, QComboBox) -from PyQt5.QtGui import QFont, QStandardItem, QBrush +from typing import TYPE_CHECKING + +from PyQt5.QtWidgets import QLabel, QVBoxLayout, QGridLayout, QPushButton -from electrum.util import bh2u, NotEnoughFunds, NoDynamicFeeEstimates from electrum.i18n import _ -from electrum.lnchannel import AbstractChannel, PeerState -from electrum.wallet import Abstract_Wallet -from electrum.lnutil import LOCAL, REMOTE, format_short_channel_id, LN_MAX_FUNDING_SAT from electrum.lnutil import ln_dummy_address -from electrum.lnworker import LNWallet from electrum.transaction import PartialTxOutput -from .util import (MyTreeView, WindowModalDialog, Buttons, OkButton, CancelButton, - EnterButton, WaitingDialog, MONOSPACE_FONT, ColorScheme) -from .amountedit import BTCAmountEdit, FreezableLineEdit -from .util import WWLabel +from .util import (WindowModalDialog, Buttons, OkButton, CancelButton, + EnterButton, ColorScheme, WWLabel, read_QIcon) +from .amountedit import BTCAmountEdit from .fee_slider import FeeSlider, FeeComboBox -import asyncio -from .util import read_QIcon +if TYPE_CHECKING: + from .main_window import ElectrumWindow CANNOT_RECEIVE_WARNING = """ The requested amount is higher than what you can receive in your currently open channels. @@ -29,9 +21,10 @@ If the swap cannot be performed after 24h, you will be refunded. Do you want to continue? """ + class SwapDialog(WindowModalDialog): - def __init__(self, window): + def __init__(self, window: 'ElectrumWindow'): WindowModalDialog.__init__(self, window, _('Submarine Swap')) self.window = window self.config = window.config