Skip to content

Instantly share code, notes, and snippets.

@badmofo
Last active February 20, 2016 17:48
Show Gist options
  • Save badmofo/61c03063cfebbf467eee to your computer and use it in GitHub Desktop.
Save badmofo/61c03063cfebbf467eee to your computer and use it in GitHub Desktop.
Re-enables Trustedcoin after restoring your 2FA Electrum wallet from seed.
# Re-enables Trustedcoin after restoring your 2FA Electrum wallet from seed.
# Pass your wallet file as the first argument:
# python 2fa_restore.py ~/.electrum/wallets/default_wallet
import json
import sys
wallet = json.load(open(sys.argv[1]))
assert wallet['wallet_type'] == '2fa'
wallet['use_trustedcoin'] = True
wallet['master_private_keys'].pop('x2', None)
wallet.pop('seed', None)
json.dump(wallet, open(sys.argv[1], 'w'), indent=4)
print('done')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment