gui: update stdio and text after db and storage separation (#6567)
e1ce3aace7 updated the qt and kivy guis, but not stdio or text one.
This commit is contained in:
@@ -5,6 +5,7 @@ import logging
|
|||||||
|
|
||||||
from electrum import util
|
from electrum import util
|
||||||
from electrum import WalletStorage, Wallet
|
from electrum import WalletStorage, Wallet
|
||||||
|
from electrum.wallet_db import WalletDB
|
||||||
from electrum.util import format_satoshis
|
from electrum.util import format_satoshis
|
||||||
from electrum.bitcoin import is_address, COIN
|
from electrum.bitcoin import is_address, COIN
|
||||||
from electrum.transaction import PartialTxOutput
|
from electrum.transaction import PartialTxOutput
|
||||||
@@ -30,6 +31,8 @@ class ElectrumGui:
|
|||||||
password = getpass.getpass('Password:', stream=None)
|
password = getpass.getpass('Password:', stream=None)
|
||||||
storage.decrypt(password)
|
storage.decrypt(password)
|
||||||
|
|
||||||
|
db = WalletDB(storage.read(), manual_upgrades=False)
|
||||||
|
|
||||||
self.done = 0
|
self.done = 0
|
||||||
self.last_balance = ""
|
self.last_balance = ""
|
||||||
|
|
||||||
@@ -40,7 +43,7 @@ class ElectrumGui:
|
|||||||
self.str_amount = ""
|
self.str_amount = ""
|
||||||
self.str_fee = ""
|
self.str_fee = ""
|
||||||
|
|
||||||
self.wallet = Wallet(storage, config=config)
|
self.wallet = Wallet(db, storage, config=config)
|
||||||
self.wallet.start_network(self.network)
|
self.wallet.start_network(self.network)
|
||||||
self.contacts = self.wallet.contacts
|
self.contacts = self.wallet.contacts
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ from electrum.util import format_satoshis
|
|||||||
from electrum.bitcoin import is_address, COIN
|
from electrum.bitcoin import is_address, COIN
|
||||||
from electrum.transaction import PartialTxOutput
|
from electrum.transaction import PartialTxOutput
|
||||||
from electrum.wallet import Wallet
|
from electrum.wallet import Wallet
|
||||||
|
from electrum.wallet_db import WalletDB
|
||||||
from electrum.storage import WalletStorage
|
from electrum.storage import WalletStorage
|
||||||
from electrum.network import NetworkParameters, TxBroadcastError, BestEffortRequestFailed
|
from electrum.network import NetworkParameters, TxBroadcastError, BestEffortRequestFailed
|
||||||
from electrum.interface import ServerAddr
|
from electrum.interface import ServerAddr
|
||||||
@@ -41,7 +42,8 @@ class ElectrumGui:
|
|||||||
if storage.is_encrypted():
|
if storage.is_encrypted():
|
||||||
password = getpass.getpass('Password:', stream=None)
|
password = getpass.getpass('Password:', stream=None)
|
||||||
storage.decrypt(password)
|
storage.decrypt(password)
|
||||||
self.wallet = Wallet(storage, config=config)
|
db = WalletDB(storage.read(), manual_upgrades=False)
|
||||||
|
self.wallet = Wallet(db, storage, config=config)
|
||||||
self.wallet.start_network(self.network)
|
self.wallet.start_network(self.network)
|
||||||
self.contacts = self.wallet.contacts
|
self.contacts = self.wallet.contacts
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user