1
0

separation between wallet storage and config

This commit is contained in:
ThomasV
2013-09-01 15:26:52 +02:00
parent b983d12929
commit d99a381d83
8 changed files with 220 additions and 231 deletions

View File

@@ -5,7 +5,7 @@ _ = lambda x:x
from electrum.util import format_satoshis, set_verbosity
from electrum.bitcoin import is_valid
from electrum import Wallet, WalletVerifier, WalletSynchronizer
from electrum import Wallet, WalletVerifier, WalletSynchronizer, WalletStorage
import tty, sys
@@ -15,19 +15,19 @@ class ElectrumGui:
def __init__(self, config, interface):
self.config = config
found = self.config.wallet_file_exists
if not found:
storage = WalletStorage(config)
if not storage.file_exists:
print "Wallet not found. try 'electrum create'"
exit()
wallet = Wallet(self.config)
wallet = Wallet(storage)
wallet.interface = interface
self.wallet = wallet
verifier = WalletVerifier(interface, config)
verifier.start()
wallet.set_verifier(verifier)
synchronizer = WalletSynchronizer(wallet, config)
synchronizer = WalletSynchronizer(wallet)
synchronizer.start()
self.stdscr = curses.initscr()