From 6a00cf9942ab77943b05e880e1fea43ccf5488c4 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sun, 13 Jan 2019 22:44:46 -0500 Subject: [PATCH] mypy fixes --- torba/orchstr8/node.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/torba/orchstr8/node.py b/torba/orchstr8/node.py index abe2009d9..b53aa7486 100644 --- a/torba/orchstr8/node.py +++ b/torba/orchstr8/node.py @@ -164,12 +164,14 @@ class WalletNode: }) self.ledger = self.manager.ledgers[self.ledger_class] self.wallet = self.manager.default_wallet - if seed is None: + if seed is None and self.wallet is not None: self.wallet.generate_account(self.ledger) - else: + elif self.wallet is not None: self.ledger.account_class.from_dict( self.ledger, self.wallet, {'seed': seed} ) + else: + raise ValueError('Wallet is required.') self.account = self.wallet.default_account await self.manager.start()