Skip to content

Commit

Permalink
[chore] Allow wallet.save_seed to create a file if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
John-peterson-coinbase committed Sep 24, 2024
1 parent 3b5b3e9 commit 4dbc2b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cdp/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,9 @@ def _existing_seeds(self, file_path: str) -> dict[str, Any]:
"""
seeds_in_file = {}

with open(file_path) as f:
seeds_in_file = json.load(f)
if os.path.exists(file_path):
with open(file_path) as f:
seeds_in_file = json.load(f)

return seeds_in_file

Expand Down

0 comments on commit 4dbc2b7

Please sign in to comment.