Skip to content

Commit

Permalink
Add wallet error hint
Browse files Browse the repository at this point in the history
Signed-off-by: cyc60 <avsysoev60@gmail.com>
  • Loading branch information
cyc60 committed Aug 27, 2024
1 parent bad3c9a commit a377efe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/common/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ def account(self) -> LocalAccount:
keystore_file = settings.hot_wallet_file
keystore_password_file = settings.hot_wallet_password_file
if not os.path.isfile(keystore_file):
raise ValueError(f"Can't open key file. Path: {keystore_file}")
raise ValueError(
f"Can't open wallet key file. "
f'Run `create-wallet` command first. '
f'Path: {keystore_file}'
)
if not os.path.isfile(keystore_password_file):
raise ValueError(f"Can't open password file. Path: {keystore_password_file}")
raise ValueError(f"Can't open wallet password file. Path: {keystore_password_file}")

with open(keystore_file, 'r', encoding='utf-8') as f:
keyfile_json = json.load(f)
Expand Down

0 comments on commit a377efe

Please sign in to comment.