diff --git a/tests/unit/test_wallet.py b/tests/unit/test_wallet.py index 12d591322..2adce9dde 100644 --- a/tests/unit/test_wallet.py +++ b/tests/unit/test_wallet.py @@ -70,8 +70,7 @@ class TestWalletCreation(unittest.TestCase): wallet_file.seek(0) # create and write wallet to a file - wallet_storage = WalletStorage(wallet_file.name) - wallet = Wallet.from_storage(wallet_storage, manager) + wallet = manager.import_wallet(wallet_file.name) account = wallet.generate_account(ledger) wallet.save() diff --git a/torba/manager.py b/torba/manager.py index 3dee2064e..f535be24e 100644 --- a/torba/manager.py +++ b/torba/manager.py @@ -32,7 +32,7 @@ class WalletManager(object): self.ledgers[ledger_class] = ledger return ledger - def create_wallet(self, path): + def import_wallet(self, path): storage = WalletStorage(path) wallet = Wallet.from_storage(storage, self) self.wallets.append(wallet) @@ -57,12 +57,6 @@ class WalletManager(object): for wallet in self.wallets: return wallet.default_account - def get_accounts(self, coin_class): - for wallet in self.wallets: - for account in wallet.accounts: - if account.coin.__class__ is coin_class: - yield account - @defer.inlineCallbacks def start(self): self.running = True