Skip to content

Commit

Permalink
update the default block explorer for users upgrading from a version …
Browse files Browse the repository at this point in the history
…< 5.1.5

Make users try the new block explorer at least once. They can change it again later.
  • Loading branch information
PiRK committed Sep 6, 2022
1 parent a82b8bf commit 448731d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions electroncash/migrate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
The first time a user runs this program, if he already uses Electron Cash,
he should be able to see all his BCH wallets and have some of the
settings imported.
This module also handles updating the config file when default config parameters are
changed.
"""
import glob
import logging
Expand Down Expand Up @@ -215,6 +218,11 @@ def update_config():
_logger.info(f"Deleting exchange cache data {fname}")
safe_rm(fname)

# Change default block explorer to e.cash
if tuple(config_version) <= (5, 1, 4) and "block_explorer" in config:
_logger.info("Updating the block explorer to the new default explorer.e.cash")
config["block_explorer"] = "eCash"

# update version number, to avoid doing this again for this version
config["latest_version_used"] = VERSION_TUPLE
save_user_config(config, get_user_dir())

0 comments on commit 448731d

Please sign in to comment.