mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
parent
8072ad1ad9
commit
026448837f
38 changed files with 177 additions and 113 deletions
|
@ -23,6 +23,7 @@
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
|
import os
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
@ -34,14 +35,14 @@ try:
|
||||||
except Exception:
|
except Exception:
|
||||||
sys.exit("Error: Could not import PyQt5 on Linux systems, you may try 'sudo apt-get install python3-pyqt5'")
|
sys.exit("Error: Could not import PyQt5 on Linux systems, you may try 'sudo apt-get install python3-pyqt5'")
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QGuiApplication
|
||||||
from PyQt5.QtWidgets import *
|
from PyQt5.QtWidgets import (QApplication, QSystemTrayIcon, QWidget, QMenu,
|
||||||
from PyQt5.QtCore import *
|
QMessageBox)
|
||||||
|
from PyQt5.QtCore import QObject, pyqtSignal, QTimer
|
||||||
import PyQt5.QtCore as QtCore
|
import PyQt5.QtCore as QtCore
|
||||||
|
|
||||||
from electrum.i18n import _, set_language
|
from electrum.i18n import _, set_language
|
||||||
from electrum.plugin import run_hook
|
from electrum.plugin import run_hook
|
||||||
from electrum.storage import WalletStorage
|
|
||||||
from electrum.base_wizard import GoBack
|
from electrum.base_wizard import GoBack
|
||||||
from electrum.util import (UserCancelled, PrintError, profiler,
|
from electrum.util import (UserCancelled, PrintError, profiler,
|
||||||
WalletFileException, BitcoinException, get_new_wallet_name)
|
WalletFileException, BitcoinException, get_new_wallet_name)
|
||||||
|
@ -49,7 +50,7 @@ from electrum.util import (UserCancelled, PrintError, profiler,
|
||||||
from .installwizard import InstallWizard
|
from .installwizard import InstallWizard
|
||||||
|
|
||||||
|
|
||||||
from .util import * # * needed for plugins
|
from .util import get_default_language, read_QIcon, ColorScheme
|
||||||
from .main_window import ElectrumWindow
|
from .main_window import ElectrumWindow
|
||||||
from .network_dialog import NetworkDialog
|
from .network_dialog import NetworkDialog
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,9 @@
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
|
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtWidgets import QVBoxLayout, QLabel
|
||||||
from PyQt5.QtGui import *
|
|
||||||
from PyQt5.QtWidgets import *
|
|
||||||
|
|
||||||
from .util import *
|
from .util import WindowModalDialog, ButtonsLineEdit, ColorScheme, Buttons, CloseButton
|
||||||
from .history_list import HistoryList, HistoryModel
|
from .history_list import HistoryList, HistoryModel
|
||||||
from .qrtextedit import ShowQRTextEdit
|
from .qrtextedit import ShowQRTextEdit
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,17 @@
|
||||||
import webbrowser
|
import webbrowser
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
|
|
||||||
|
from PyQt5.QtCore import Qt, QPersistentModelIndex, QModelIndex
|
||||||
|
from PyQt5.QtGui import QStandardItemModel, QStandardItem, QFont
|
||||||
|
from PyQt5.QtWidgets import QAbstractItemView, QComboBox, QLabel, QMenu
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.util import block_explorer_URL
|
from electrum.util import block_explorer_URL
|
||||||
from electrum.plugin import run_hook
|
from electrum.plugin import run_hook
|
||||||
from electrum.bitcoin import is_address
|
from electrum.bitcoin import is_address
|
||||||
from electrum.wallet import InternalAddressCorruption
|
from electrum.wallet import InternalAddressCorruption
|
||||||
|
|
||||||
from .util import *
|
from .util import MyTreeView, MONOSPACE_FONT, ColorScheme
|
||||||
|
|
||||||
|
|
||||||
class AddressList(MyTreeView):
|
class AddressList(MyTreeView):
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtCore import pyqtSignal, Qt
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QPalette, QPainter
|
||||||
from PyQt5.QtWidgets import (QLineEdit, QStyle, QStyleOptionFrame)
|
from PyQt5.QtWidgets import (QLineEdit, QStyle, QStyleOptionFrame)
|
||||||
|
|
||||||
from electrum.util import (format_satoshis_plain, decimal_point_to_base_unit_name,
|
from electrum.util import (format_satoshis_plain, decimal_point_to_base_unit_name,
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QTextCursor
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtCore import Qt
|
||||||
from PyQt5.QtWidgets import *
|
from PyQt5.QtWidgets import QCompleter, QPlainTextEdit, QApplication
|
||||||
|
|
||||||
from .util import ButtonsTextEdit
|
from .util import ButtonsTextEdit
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import sys
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
import platform
|
|
||||||
|
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore
|
||||||
from PyQt5 import QtGui
|
from PyQt5 import QtGui
|
||||||
|
@ -14,13 +13,7 @@ from PyQt5 import QtWidgets
|
||||||
from electrum import util
|
from electrum import util
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
|
|
||||||
|
from .util import MONOSPACE_FONT
|
||||||
if platform.system() == 'Windows':
|
|
||||||
MONOSPACE_FONT = 'Lucida Console'
|
|
||||||
elif platform.system() == 'Darwin':
|
|
||||||
MONOSPACE_FONT = 'Monaco'
|
|
||||||
else:
|
|
||||||
MONOSPACE_FONT = 'monospace'
|
|
||||||
|
|
||||||
|
|
||||||
class OverlayLabel(QtWidgets.QLabel):
|
class OverlayLabel(QtWidgets.QLabel):
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
import webbrowser
|
import webbrowser
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QStandardItemModel, QStandardItem
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtCore import Qt, QPersistentModelIndex, QModelIndex
|
||||||
from PyQt5.QtWidgets import (QAbstractItemView, QMenu)
|
from PyQt5.QtWidgets import (QAbstractItemView, QMenu)
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
|
|
|
@ -27,8 +27,8 @@ import traceback
|
||||||
|
|
||||||
from PyQt5.QtCore import QObject
|
from PyQt5.QtCore import QObject
|
||||||
import PyQt5.QtCore as QtCore
|
import PyQt5.QtCore as QtCore
|
||||||
from PyQt5.QtGui import QIcon
|
from PyQt5.QtWidgets import (QWidget, QLabel, QPushButton, QTextEdit,
|
||||||
from PyQt5.QtWidgets import *
|
QMessageBox, QHBoxLayout, QVBoxLayout)
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.base_crash_reporter import BaseCrashReporter
|
from electrum.base_crash_reporter import BaseCrashReporter
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QCursor
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtCore import Qt
|
||||||
from PyQt5.QtWidgets import QSlider, QToolTip
|
from PyQt5.QtWidgets import QSlider, QToolTip
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
|
import os
|
||||||
import webbrowser
|
import webbrowser
|
||||||
import datetime
|
import datetime
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
@ -31,12 +32,21 @@ import threading
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
|
from PyQt5.QtGui import QMouseEvent, QFont, QBrush, QColor
|
||||||
|
from PyQt5.QtCore import (Qt, QPersistentModelIndex, QModelIndex, QAbstractItemModel,
|
||||||
|
QSortFilterProxyModel, QVariant, QItemSelectionModel, QDate, QPoint)
|
||||||
|
from PyQt5.QtWidgets import (QMenu, QHeaderView, QLabel, QMessageBox,
|
||||||
|
QPushButton, QComboBox, QVBoxLayout, QCalendarWidget,
|
||||||
|
QGridLayout)
|
||||||
|
|
||||||
from electrum.address_synchronizer import TX_HEIGHT_LOCAL
|
from electrum.address_synchronizer import TX_HEIGHT_LOCAL
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.util import (block_explorer_URL, profiler, print_error, TxMinedInfo,
|
from electrum.util import (block_explorer_URL, profiler, print_error, TxMinedInfo,
|
||||||
OrderedDictWithIndex, PrintError, timestamp_to_datetime)
|
OrderedDictWithIndex, PrintError, timestamp_to_datetime)
|
||||||
|
|
||||||
from .util import *
|
from .util import (read_QIcon, MONOSPACE_FONT, Buttons, CancelButton, OkButton,
|
||||||
|
filename_field, MyTreeView, AcceptFileDragDrop, WindowModalDialog,
|
||||||
|
CloseButton)
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from electrum.wallet import Abstract_Wallet
|
from electrum.wallet import Abstract_Wallet
|
||||||
|
|
|
@ -8,9 +8,11 @@ import threading
|
||||||
import traceback
|
import traceback
|
||||||
from typing import Tuple, List, Callable
|
from typing import Tuple, List, Callable
|
||||||
|
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtCore import QRect, QEventLoop, Qt, pyqtSignal
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QPalette, QPen, QPainter, QPixmap
|
||||||
from PyQt5.QtWidgets import *
|
from PyQt5.QtWidgets import (QWidget, QDialog, QLabel, QHBoxLayout, QMessageBox,
|
||||||
|
QVBoxLayout, QLineEdit, QFileDialog, QPushButton,
|
||||||
|
QGridLayout, QSlider, QScrollArea)
|
||||||
|
|
||||||
from electrum.wallet import Wallet
|
from electrum.wallet import Wallet
|
||||||
from electrum.storage import WalletStorage
|
from electrum.storage import WalletStorage
|
||||||
|
@ -20,7 +22,8 @@ from electrum.i18n import _
|
||||||
|
|
||||||
from .seed_dialog import SeedLayout, KeysLayout
|
from .seed_dialog import SeedLayout, KeysLayout
|
||||||
from .network_dialog import NetworkChoiceLayout
|
from .network_dialog import NetworkChoiceLayout
|
||||||
from .util import *
|
from .util import (MessageBoxMixin, Buttons, icon_path, ChoicesLayout, WWLabel,
|
||||||
|
InfoButton)
|
||||||
from .password_dialog import PasswordLayout, PasswordLayoutForHW, PW_NEW
|
from .password_dialog import PasswordLayout, PasswordLayoutForHW, PW_NEW
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,15 @@
|
||||||
|
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
|
|
||||||
|
from PyQt5.QtCore import Qt, QItemSelectionModel
|
||||||
|
from PyQt5.QtGui import QStandardItemModel, QStandardItem, QFont
|
||||||
|
from PyQt5.QtWidgets import QHeaderView, QMenu
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.util import format_time
|
from electrum.util import format_time
|
||||||
|
|
||||||
from .util import *
|
from .util import (MyTreeView, read_QIcon, MONOSPACE_FONT, PR_UNPAID,
|
||||||
|
pr_tooltips, import_meta_gui, export_meta_gui, pr_icons)
|
||||||
|
|
||||||
|
|
||||||
class InvoiceList(MyTreeView):
|
class InvoiceList(MyTreeView):
|
||||||
|
|
|
@ -38,10 +38,14 @@ from functools import partial
|
||||||
import queue
|
import queue
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QPixmap, QKeySequence, QIcon, QCursor
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtCore import Qt, QRect, QStringListModel, QSize, pyqtSignal
|
||||||
import PyQt5.QtCore as QtCore
|
from PyQt5.QtWidgets import (QMessageBox, QComboBox, QSystemTrayIcon, QTabWidget,
|
||||||
from PyQt5.QtWidgets import *
|
QSpinBox, QMenuBar, QFileDialog, QCheckBox, QLabel,
|
||||||
|
QVBoxLayout, QGridLayout, QLineEdit, QTreeWidgetItem,
|
||||||
|
QHBoxLayout, QPushButton, QScrollArea, QTextEdit,
|
||||||
|
QShortcut, QMainWindow, QCompleter, QInputDialog,
|
||||||
|
QWidget, QMenu, QSizePolicy, QStatusBar)
|
||||||
|
|
||||||
import electrum
|
import electrum
|
||||||
from electrum import (keystore, simple_config, ecc, constants, util, bitcoin, commands,
|
from electrum import (keystore, simple_config, ecc, constants, util, bitcoin, commands,
|
||||||
|
@ -72,7 +76,12 @@ from .qrcodewidget import QRCodeWidget, QRDialog
|
||||||
from .qrtextedit import ShowQRTextEdit, ScanQRTextEdit
|
from .qrtextedit import ShowQRTextEdit, ScanQRTextEdit
|
||||||
from .transaction_dialog import show_transaction
|
from .transaction_dialog import show_transaction
|
||||||
from .fee_slider import FeeSlider
|
from .fee_slider import FeeSlider
|
||||||
from .util import *
|
from .util import (read_QIcon, ColorScheme, text_dialog, icon_path, WaitingDialog,
|
||||||
|
WindowModalDialog, ChoicesLayout, HelpLabel, FromList, Buttons,
|
||||||
|
OkButton, InfoButton, WWLabel, TaskThread, CancelButton,
|
||||||
|
CloseButton, HelpButton, MessageBoxMixin, EnterButton, expiration_values,
|
||||||
|
ButtonsLineEdit, CopyCloseButton, import_meta_gui, export_meta_gui,
|
||||||
|
filename_field, address_field)
|
||||||
from .installwizard import WIF_HELP_TEXT
|
from .installwizard import WIF_HELP_TEXT
|
||||||
from .history_list import HistoryList, HistoryModel
|
from .history_list import HistoryList, HistoryModel
|
||||||
from .update_checker import UpdateCheck, UpdateCheckThread
|
from .update_checker import UpdateCheck, UpdateCheckThread
|
||||||
|
|
|
@ -24,12 +24,13 @@
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
|
import time
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtCore import Qt, pyqtSignal, QThread
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtWidgets import (QTreeWidget, QTreeWidgetItem, QMenu, QGridLayout, QComboBox,
|
||||||
from PyQt5.QtWidgets import *
|
QLineEdit, QDialog, QVBoxLayout, QHeaderView, QCheckBox,
|
||||||
import PyQt5.QtCore as QtCore
|
QTabWidget, QWidget, QLabel)
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum import constants, blockchain
|
from electrum import constants, blockchain
|
||||||
|
@ -37,7 +38,7 @@ from electrum.util import print_error
|
||||||
from electrum.interface import serialize_server, deserialize_server
|
from electrum.interface import serialize_server, deserialize_server
|
||||||
from electrum.network import Network
|
from electrum.network import Network
|
||||||
|
|
||||||
from .util import *
|
from .util import Buttons, CloseButton, HelpButton, read_QIcon
|
||||||
|
|
||||||
protocol_names = ['TCP', 'SSL']
|
protocol_names = ['TCP', 'SSL']
|
||||||
protocol_letters = 'ts'
|
protocol_letters = 'ts'
|
||||||
|
|
|
@ -27,13 +27,13 @@ import re
|
||||||
import math
|
import math
|
||||||
|
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QPixmap
|
||||||
from PyQt5.QtWidgets import *
|
from PyQt5.QtWidgets import QLineEdit, QLabel, QGridLayout, QVBoxLayout, QCheckBox
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.plugin import run_hook
|
from electrum.plugin import run_hook
|
||||||
|
|
||||||
from .util import *
|
from .util import icon_path, WindowModalDialog, OkButton, CancelButton, Buttons
|
||||||
|
|
||||||
|
|
||||||
def check_password_strength(password):
|
def check_password_strength(password):
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
import re
|
import re
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QFontMetrics
|
||||||
|
|
||||||
from electrum import bitcoin
|
from electrum import bitcoin
|
||||||
from electrum.util import bfh, PrintError
|
from electrum.util import bfh, PrintError
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import qrcode
|
import qrcode
|
||||||
|
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtGui import QColor
|
||||||
from PyQt5.QtGui import *
|
|
||||||
import PyQt5.QtGui as QtGui
|
import PyQt5.QtGui as QtGui
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QApplication, QVBoxLayout, QTextEdit, QHBoxLayout, QPushButton, QWidget)
|
QApplication, QVBoxLayout, QTextEdit, QHBoxLayout, QPushButton, QWidget)
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from PyQt5.QtGui import *
|
|
||||||
from PyQt5.QtCore import *
|
|
||||||
from PyQt5.QtWidgets import QFileDialog
|
from PyQt5.QtWidgets import QFileDialog
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
|
|
|
@ -23,11 +23,17 @@
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
|
from PyQt5.QtCore import Qt
|
||||||
|
from PyQt5.QtGui import QPixmap
|
||||||
|
from PyQt5.QtWidgets import (QVBoxLayout, QCheckBox, QHBoxLayout, QLineEdit,
|
||||||
|
QLabel, QCompleter, QDialog)
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.mnemonic import Mnemonic
|
from electrum.mnemonic import Mnemonic
|
||||||
import electrum.old_mnemonic
|
import electrum.old_mnemonic
|
||||||
|
|
||||||
from .util import *
|
from .util import (Buttons, OkButton, WWLabel, ButtonsTextEdit, icon_path,
|
||||||
|
EnterButton, CloseButton, WindowModalDialog)
|
||||||
from .qrtextedit import ShowQRTextEdit, ScanQRTextEdit
|
from .qrtextedit import ShowQRTextEdit, ScanQRTextEdit
|
||||||
from .completion_text_edit import CompletionTextEdit
|
from .completion_text_edit import CompletionTextEdit
|
||||||
|
|
||||||
|
|
|
@ -22,15 +22,17 @@
|
||||||
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
|
import sys
|
||||||
import copy
|
import copy
|
||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtCore import QSize
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QTextCharFormat, QBrush, QFont
|
||||||
from PyQt5.QtWidgets import *
|
from PyQt5.QtWidgets import (QDialog, QLabel, QPushButton, QHBoxLayout, QVBoxLayout,
|
||||||
|
QTextEdit)
|
||||||
import qrcode
|
import qrcode
|
||||||
from qrcode import exceptions
|
from qrcode import exceptions
|
||||||
|
|
||||||
|
@ -41,7 +43,8 @@ from electrum import simple_config
|
||||||
from electrum.util import bfh
|
from electrum.util import bfh
|
||||||
from electrum.transaction import SerializationError, Transaction
|
from electrum.transaction import SerializationError, Transaction
|
||||||
|
|
||||||
from .util import *
|
from .util import (MessageBoxMixin, read_QIcon, Buttons, CopyButton,
|
||||||
|
MONOSPACE_FONT, ColorScheme, ButtonsLineEdit)
|
||||||
|
|
||||||
|
|
||||||
SAVE_BUTTON_ENABLED_TOOLTIP = _("Save transaction offline")
|
SAVE_BUTTON_ENABLED_TOOLTIP = _("Save transaction offline")
|
||||||
|
|
|
@ -9,9 +9,16 @@ import traceback
|
||||||
from functools import partial, lru_cache
|
from functools import partial, lru_cache
|
||||||
from typing import NamedTuple, Callable, Optional, TYPE_CHECKING, Union, List, Dict
|
from typing import NamedTuple, Callable, Optional, TYPE_CHECKING, Union, List, Dict
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import (QFont, QColor, QCursor, QPixmap, QStandardItem,
|
||||||
from PyQt5.QtCore import *
|
QPalette, QIcon)
|
||||||
from PyQt5.QtWidgets import *
|
from PyQt5.QtCore import (Qt, QPersistentModelIndex, QModelIndex, pyqtSignal,
|
||||||
|
QCoreApplication, QItemSelectionModel, QThread,
|
||||||
|
QSortFilterProxyModel, QSize, QLocale)
|
||||||
|
from PyQt5.QtWidgets import (QPushButton, QLabel, QMessageBox, QHBoxLayout,
|
||||||
|
QAbstractItemView, QVBoxLayout, QLineEdit,
|
||||||
|
QStyle, QDialog, QGroupBox, QButtonGroup, QRadioButton,
|
||||||
|
QFileDialog, QWidget, QToolButton, QTreeView, QPlainTextEdit,
|
||||||
|
QHeaderView, QApplication, QToolTip, QTreeWidget, QStyledItemDelegate)
|
||||||
|
|
||||||
from electrum.i18n import _, languages
|
from electrum.i18n import _, languages
|
||||||
from electrum.util import (FileImportFailed, FileExportFailed,
|
from electrum.util import (FileImportFailed, FileExportFailed,
|
||||||
|
|
|
@ -26,9 +26,13 @@
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
|
|
||||||
|
from PyQt5.QtCore import Qt
|
||||||
|
from PyQt5.QtGui import QStandardItemModel, QStandardItem, QFont
|
||||||
|
from PyQt5.QtWidgets import QAbstractItemView, QMenu
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
|
|
||||||
from .util import *
|
from .util import MyTreeView, ColorScheme, MONOSPACE_FONT
|
||||||
|
|
||||||
class UTXOList(MyTreeView):
|
class UTXOList(MyTreeView):
|
||||||
|
|
||||||
|
|
|
@ -5,15 +5,13 @@ from io import BytesIO
|
||||||
import sys
|
import sys
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
|
from PyQt5.QtWidgets import (QComboBox, QGridLayout, QLabel, QPushButton)
|
||||||
|
|
||||||
from electrum.plugin import BasePlugin, hook
|
from electrum.plugin import BasePlugin, hook
|
||||||
from electrum.gui.qt.util import WaitingDialog, EnterButton, WindowModalDialog, read_QIcon
|
from electrum.gui.qt.util import WaitingDialog, EnterButton, WindowModalDialog, read_QIcon
|
||||||
from electrum.util import print_msg, print_error
|
from electrum.util import print_msg, print_error
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
|
||||||
from PyQt5.QtCore import *
|
|
||||||
from PyQt5.QtWidgets import (QComboBox, QGridLayout, QLabel, QPushButton)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import amodem.audio
|
import amodem.audio
|
||||||
import amodem.main
|
import amodem.main
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
import time
|
import time
|
||||||
|
from functools import partial
|
||||||
|
|
||||||
|
from PyQt5.QtCore import Qt, pyqtSignal
|
||||||
|
from PyQt5.QtWidgets import QPushButton, QLabel, QVBoxLayout, QWidget, QGridLayout
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.plugin import hook
|
from electrum.plugin import hook
|
||||||
from electrum.wallet import Standard_Wallet
|
from electrum.wallet import Standard_Wallet
|
||||||
from electrum.gui.qt.util import *
|
from electrum.gui.qt.util import WindowModalDialog, CloseButton, get_parent_main_window
|
||||||
|
|
||||||
from .coldcard import ColdcardPlugin
|
from .coldcard import ColdcardPlugin
|
||||||
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase
|
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
import time
|
import time
|
||||||
from xmlrpc.client import ServerProxy
|
from xmlrpc.client import ServerProxy
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtCore import QObject, pyqtSignal
|
||||||
from PyQt5.QtCore import *
|
|
||||||
from PyQt5.QtWidgets import QPushButton
|
from PyQt5.QtWidgets import QPushButton
|
||||||
|
|
||||||
from electrum import util, keystore, ecc, bip32, crypto
|
from electrum import util, keystore, ecc, bip32, crypto
|
||||||
|
|
|
@ -37,8 +37,7 @@ from email.mime.multipart import MIMEMultipart
|
||||||
from email.mime.base import MIMEBase
|
from email.mime.base import MIMEBase
|
||||||
from email.encoders import encode_base64
|
from email.encoders import encode_base64
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtCore import QObject, pyqtSignal, QThread
|
||||||
from PyQt5.QtCore import *
|
|
||||||
from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QLineEdit,
|
from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QLineEdit,
|
||||||
QInputDialog)
|
QInputDialog)
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,14 @@
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
|
from functools import partial
|
||||||
|
|
||||||
from PyQt5.QtWidgets import QVBoxLayout, QLabel
|
from PyQt5.QtCore import QObject, pyqtSignal
|
||||||
|
from PyQt5.QtWidgets import QVBoxLayout, QLineEdit, QHBoxLayout, QLabel
|
||||||
|
|
||||||
from electrum.gui.qt.password_dialog import PasswordLayout, PW_PASSPHRASE
|
from electrum.gui.qt.password_dialog import PasswordLayout, PW_PASSPHRASE
|
||||||
from electrum.gui.qt.util import *
|
from electrum.gui.qt.util import (read_QIcon, WWLabel, OkButton, WindowModalDialog,
|
||||||
|
Buttons, CancelButton, TaskThread)
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.util import PrintError
|
from electrum.util import PrintError
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt, QEventLoop, pyqtSignal, QRegExp
|
||||||
from PyQt5.QtWidgets import QGridLayout, QInputDialog, QPushButton
|
from PyQt5.QtGui import QRegExpValidator
|
||||||
from PyQt5.QtWidgets import QVBoxLayout, QLabel
|
from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton,
|
||||||
|
QHBoxLayout, QButtonGroup, QGroupBox, QDialog,
|
||||||
|
QTextEdit, QLineEdit, QRadioButton, QCheckBox, QWidget,
|
||||||
|
QMessageBox, QFileDialog, QSlider, QTabWidget)
|
||||||
|
|
||||||
from electrum.gui.qt.util import *
|
from electrum.gui.qt.util import (WindowModalDialog, WWLabel, Buttons, CancelButton,
|
||||||
|
OkButton, CloseButton)
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.plugin import hook
|
from electrum.plugin import hook
|
||||||
from electrum.util import bh2u
|
from electrum.util import bh2u
|
||||||
|
|
|
@ -2,15 +2,12 @@ from functools import partial
|
||||||
import traceback
|
import traceback
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtCore import QObject, pyqtSignal
|
||||||
from PyQt5.QtCore import *
|
|
||||||
from PyQt5.QtWidgets import (QHBoxLayout, QLabel, QVBoxLayout)
|
from PyQt5.QtWidgets import (QHBoxLayout, QLabel, QVBoxLayout)
|
||||||
|
|
||||||
from electrum.plugin import hook
|
from electrum.plugin import hook
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.gui.qt import EnterButton
|
from electrum.gui.qt.util import ThreadedButton, Buttons, EnterButton, WindowModalDialog, OkButton
|
||||||
from electrum.gui.qt.util import ThreadedButton, Buttons
|
|
||||||
from electrum.gui.qt.util import WindowModalDialog, OkButton
|
|
||||||
|
|
||||||
from .labels import LabelsPlugin
|
from .labels import LabelsPlugin
|
||||||
|
|
||||||
|
|
|
@ -7,17 +7,16 @@ from binascii import hexlify, unhexlify
|
||||||
|
|
||||||
import websocket
|
import websocket
|
||||||
|
|
||||||
from PyQt5.QtWidgets import QDialog, QLineEdit, QTextEdit, QVBoxLayout, QLabel
|
from PyQt5.QtWidgets import (QDialog, QLineEdit, QTextEdit, QVBoxLayout, QLabel,
|
||||||
import PyQt5.QtCore as QtCore
|
QWidget, QHBoxLayout, QComboBox, QPushButton)
|
||||||
from PyQt5.QtWidgets import *
|
from PyQt5.QtCore import QThread, pyqtSignal
|
||||||
|
|
||||||
from btchip.btchip import *
|
from btchip.btchip import BTChipException
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.util import print_msg
|
from electrum.util import print_msg
|
||||||
from electrum import constants, bitcoin
|
from electrum import constants, bitcoin
|
||||||
from electrum.gui.qt.qrcodewidget import QRCodeWidget
|
from electrum.gui.qt.qrcodewidget import QRCodeWidget
|
||||||
from electrum.gui.qt.util import *
|
|
||||||
|
|
||||||
|
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
|
from functools import partial
|
||||||
|
|
||||||
#from btchip.btchipPersoWizard import StartBTChipPersoDialog
|
#from btchip.btchipPersoWizard import StartBTChipPersoDialog
|
||||||
|
|
||||||
|
from PyQt5.QtCore import pyqtSignal
|
||||||
|
from PyQt5.QtWidgets import QInputDialog, QLabel, QVBoxLayout, QLineEdit
|
||||||
|
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.plugin import hook
|
from electrum.plugin import hook
|
||||||
from electrum.wallet import Standard_Wallet
|
from electrum.wallet import Standard_Wallet
|
||||||
from electrum.gui.qt.util import *
|
from electrum.gui.qt.util import WindowModalDialog
|
||||||
|
|
||||||
from .ledger import LedgerPlugin
|
from .ledger import LedgerPlugin
|
||||||
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase
|
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase
|
||||||
|
|
|
@ -11,20 +11,28 @@ Tiago Romagnani Silveira, 2017
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import qrcode
|
|
||||||
import traceback
|
import traceback
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
from functools import partial
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import qrcode
|
||||||
from PyQt5.QtPrintSupport import QPrinter
|
from PyQt5.QtPrintSupport import QPrinter
|
||||||
|
from PyQt5.QtCore import Qt, QRectF, QRect, QSizeF, QUrl, QPoint, QSize
|
||||||
|
from PyQt5.QtGui import (QPixmap, QImage, QBitmap, QPainter, QFontDatabase, QPen, QFont,
|
||||||
|
QColor, QDesktopServices, qRgba, QPainterPath)
|
||||||
|
from PyQt5.QtWidgets import (QGridLayout, QVBoxLayout, QHBoxLayout, QLabel,
|
||||||
|
QPushButton, QLineEdit)
|
||||||
|
|
||||||
from electrum.plugin import hook
|
from electrum.plugin import hook
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.util import make_dir, InvalidPassword, UserCancelled, bh2u, bfh
|
from electrum.util import make_dir, InvalidPassword, UserCancelled
|
||||||
from electrum.gui.qt.util import *
|
from electrum.gui.qt.util import (read_QIcon, EnterButton, WWLabel, icon_path,
|
||||||
|
WindowModalDialog, Buttons, CloseButton, OkButton)
|
||||||
from electrum.gui.qt.qrtextedit import ScanQRTextEdit
|
from electrum.gui.qt.qrtextedit import ScanQRTextEdit
|
||||||
from electrum.gui.qt.main_window import StatusBarButton
|
from electrum.gui.qt.main_window import StatusBarButton
|
||||||
|
|
||||||
from .revealer import RevealerPlugin, VersionedSeed
|
from .revealer import RevealerPlugin
|
||||||
|
|
||||||
|
|
||||||
class Plugin(RevealerPlugin):
|
class Plugin(RevealerPlugin):
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt, pyqtSignal, QRegExp
|
||||||
from PyQt5.QtWidgets import QGridLayout, QInputDialog, QPushButton
|
from PyQt5.QtGui import QRegExpValidator
|
||||||
from PyQt5.QtWidgets import QVBoxLayout, QLabel
|
from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton,
|
||||||
|
QHBoxLayout, QButtonGroup, QGroupBox,
|
||||||
|
QTextEdit, QLineEdit, QRadioButton, QCheckBox, QWidget,
|
||||||
|
QMessageBox, QFileDialog, QSlider, QTabWidget)
|
||||||
|
|
||||||
from electrum.gui.qt.util import *
|
from electrum.gui.qt.util import (WindowModalDialog, WWLabel, Buttons, CancelButton,
|
||||||
|
OkButton, CloseButton)
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.plugin import hook
|
from electrum.plugin import hook
|
||||||
from electrum.util import bh2u
|
from electrum.util import bh2u
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt, QEventLoop, pyqtSignal
|
||||||
from PyQt5.QtWidgets import QGridLayout, QInputDialog, QPushButton
|
from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton,
|
||||||
from PyQt5.QtWidgets import QVBoxLayout, QLabel
|
QHBoxLayout, QButtonGroup, QGroupBox, QDialog,
|
||||||
|
QLineEdit, QRadioButton, QCheckBox, QWidget,
|
||||||
|
QMessageBox, QFileDialog, QSlider, QTabWidget)
|
||||||
|
|
||||||
from electrum.gui.qt.util import *
|
from electrum.gui.qt.util import (WindowModalDialog, WWLabel, Buttons, CancelButton,
|
||||||
|
OkButton, CloseButton)
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.plugin import hook
|
from electrum.plugin import hook
|
||||||
from electrum.util import bh2u
|
from electrum.util import bh2u
|
||||||
|
|
|
@ -25,14 +25,16 @@
|
||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import threading
|
import threading
|
||||||
from threading import Thread
|
import sys
|
||||||
import re
|
import os
|
||||||
from decimal import Decimal
|
|
||||||
|
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import QPixmap
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtCore import QObject, pyqtSignal
|
||||||
|
from PyQt5.QtWidgets import (QTextEdit, QVBoxLayout, QLabel, QGridLayout, QHBoxLayout,
|
||||||
|
QRadioButton, QCheckBox, QLineEdit)
|
||||||
|
|
||||||
from electrum.gui.qt.util import *
|
from electrum.gui.qt.util import (read_QIcon, WindowModalDialog, WaitingDialog, OkButton,
|
||||||
|
CancelButton, Buttons, icon_path, WWLabel, CloseButton)
|
||||||
from electrum.gui.qt.qrcodewidget import QRCodeWidget
|
from electrum.gui.qt.qrcodewidget import QRCodeWidget
|
||||||
from electrum.gui.qt.amountedit import AmountEdit
|
from electrum.gui.qt.amountedit import AmountEdit
|
||||||
from electrum.gui.qt.main_window import StatusBarButton
|
from electrum.gui.qt.main_window import StatusBarButton
|
||||||
|
@ -254,7 +256,7 @@ class Plugin(TrustedCoinPlugin):
|
||||||
|
|
||||||
tos_e.tos_signal.connect(on_result)
|
tos_e.tos_signal.connect(on_result)
|
||||||
tos_e.error_signal.connect(on_error)
|
tos_e.error_signal.connect(on_error)
|
||||||
t = Thread(target=request_TOS)
|
t = threading.Thread(target=request_TOS)
|
||||||
t.setDaemon(True)
|
t.setDaemon(True)
|
||||||
t.start()
|
t.start()
|
||||||
email_e.textChanged.connect(set_enabled)
|
email_e.textChanged.connect(set_enabled)
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
from PyQt5.QtGui import *
|
import random
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (QVBoxLayout, QGridLayout, QPushButton)
|
from PyQt5.QtWidgets import (QVBoxLayout, QGridLayout, QPushButton)
|
||||||
|
|
||||||
from electrum.plugin import BasePlugin, hook
|
from electrum.plugin import BasePlugin, hook
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
import random
|
|
||||||
|
|
||||||
|
|
||||||
class Plugin(BasePlugin):
|
class Plugin(BasePlugin):
|
||||||
|
|
|
@ -37,8 +37,6 @@ import os
|
||||||
import math
|
import math
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from .pem import *
|
|
||||||
|
|
||||||
|
|
||||||
def SHA1(x):
|
def SHA1(x):
|
||||||
return hashlib.sha1(x).digest()
|
return hashlib.sha1(x).digest()
|
||||||
|
|
|
@ -48,7 +48,6 @@ from .util import (NotEnoughFunds, PrintError, UserCancelled, profiler,
|
||||||
Fiat, bfh, bh2u, TxMinedInfo)
|
Fiat, bfh, bh2u, TxMinedInfo)
|
||||||
from .bitcoin import (COIN, TYPE_ADDRESS, is_address, address_to_script,
|
from .bitcoin import (COIN, TYPE_ADDRESS, is_address, address_to_script,
|
||||||
is_minikey, relayfee, dust_threshold)
|
is_minikey, relayfee, dust_threshold)
|
||||||
from .version import *
|
|
||||||
from .crypto import sha256d
|
from .crypto import sha256d
|
||||||
from .keystore import load_keystore, Hardware_KeyStore
|
from .keystore import load_keystore, Hardware_KeyStore
|
||||||
from .storage import multisig_type, STO_EV_PLAINTEXT, STO_EV_USER_PW, STO_EV_XPUB_PW, WalletStorage
|
from .storage import multisig_type, STO_EV_PLAINTEXT, STO_EV_USER_PW, STO_EV_XPUB_PW, WalletStorage
|
||||||
|
|
Loading…
Add table
Reference in a new issue