mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 01:35:20 +00:00
update curses gui for 1.9
This commit is contained in:
parent
734e810161
commit
167d4f1a53
1 changed files with 20 additions and 3 deletions
|
@ -5,12 +5,31 @@ _ = lambda x:x
|
||||||
from electrum.util import format_satoshis, set_verbosity
|
from electrum.util import format_satoshis, set_verbosity
|
||||||
from electrum.bitcoin import is_valid
|
from electrum.bitcoin import is_valid
|
||||||
|
|
||||||
|
from electrum import Wallet, WalletVerifier, WalletSynchronizer
|
||||||
|
|
||||||
import tty, sys
|
import tty, sys
|
||||||
|
|
||||||
|
|
||||||
class ElectrumGui:
|
class ElectrumGui:
|
||||||
|
|
||||||
def __init__(self, wallet, config, app=None):
|
def __init__(self, config, interface):
|
||||||
|
|
||||||
|
self.config = config
|
||||||
|
found = self.config.wallet_file_exists
|
||||||
|
if not found:
|
||||||
|
print "Wallet not found. try 'electrum create'"
|
||||||
|
exit()
|
||||||
|
|
||||||
|
wallet = Wallet(self.config)
|
||||||
|
wallet.interface = interface
|
||||||
|
self.wallet = wallet
|
||||||
|
|
||||||
|
verifier = WalletVerifier(interface, config)
|
||||||
|
verifier.start()
|
||||||
|
wallet.set_verifier(verifier)
|
||||||
|
synchronizer = WalletSynchronizer(wallet, config)
|
||||||
|
synchronizer.start()
|
||||||
|
|
||||||
self.stdscr = curses.initscr()
|
self.stdscr = curses.initscr()
|
||||||
curses.noecho()
|
curses.noecho()
|
||||||
curses.cbreak()
|
curses.cbreak()
|
||||||
|
@ -24,8 +43,6 @@ class ElectrumGui:
|
||||||
self.set_cursor(0)
|
self.set_cursor(0)
|
||||||
self.w = curses.newwin(10, 50, 5, 5)
|
self.w = curses.newwin(10, 50, 5, 5)
|
||||||
|
|
||||||
self.wallet = wallet
|
|
||||||
self.config = config
|
|
||||||
set_verbosity(False)
|
set_verbosity(False)
|
||||||
self.tab = 0
|
self.tab = 0
|
||||||
self.pos = 0
|
self.pos = 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue