Commit f0d2e189 authored by Andreas Schildbach's avatar Andreas Schildbach

WalletApplication: When replacing the wallet (e.g. on restore from a backup)...

WalletApplication: When replacing the wallet (e.g. on restore from a backup) try upgrading it first.
parent 124ad5a3
......@@ -261,6 +261,8 @@ public class WalletApplication extends Application {
public void replaceWallet(final Wallet newWallet) {
newWallet.cleanup();
if (newWallet.isDeterministicUpgradeRequired(Constants.UPGRADE_OUTPUT_SCRIPT_TYPE))
newWallet.upgradeToDeterministic(Constants.UPGRADE_OUTPUT_SCRIPT_TYPE, null);
BlockchainService.resetBlockchain(this);
final Wallet oldWallet = getWallet();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment