Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default block explorer to explorer.e.cash #231

Merged
merged 4 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ files: |
electroncash/invoice.py|
electroncash/keystore.py|
electroncash/uint256.py|
electroncash/web.py|
electroncash_gui/qt/address_list.py|
electroncash_gui/qt/amountedit.py|
electroncash_gui/qt/avalanche_dialogs.py|
Expand Down Expand Up @@ -43,7 +44,7 @@ repos:
- id: flake8
args:
- --max-line-length=88
- --ignore=E203,E501,E731,E741,W503,SIM106,SIM119,FS002
- --ignore=E203,E501,E731,E741,W503,SIM106,SIM119,FS002,FS003
additional_dependencies:
- flake8-comprehensions
- flake8-mutable
Expand Down
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())
10 changes: 5 additions & 5 deletions electroncash/tests/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def test_compact_size(self):
1,
252,
253,
2 ** 16 - 1,
2 ** 16,
2 ** 32 - 1,
2 ** 32,
2 ** 64 - 1,
2**16 - 1,
2**16,
2**32 - 1,
2**32,
2**64 - 1,
]
for v in values:
s.write_compact_size(v)
Expand Down
2 changes: 1 addition & 1 deletion electroncash/tests/test_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_write_dictionary_to_file(self):

storage = WalletStorage(self.wallet_path)

some_dict = {u"a": u"b", u"c": u"d", u"seed_version": FINAL_SEED_VERSION}
some_dict = {"a": "b", "c": "d", "seed_version": FINAL_SEED_VERSION}

for key, value in some_dict.items():
storage.put(key, value)
Expand Down
Loading