WalletAppKit: Fix when restoring from seed, the fallback chain isn't created.

This commit is contained in:
Andreas Schildbach
2019-02-19 13:50:38 +01:00
parent fa3a5b4827
commit e795ecbee5

View File

@@ -450,7 +450,7 @@ public class WalletAppKit extends AbstractIdleService {
protected Wallet createWallet() {
KeyChainGroup.Builder kcg = KeyChainGroup.builder(params, structure);
if (restoreFromSeed != null)
kcg.addChain(DeterministicKeyChain.builder().seed(restoreFromSeed).outputScriptType(preferredOutputScriptType).build());
kcg.fromSeed(restoreFromSeed, preferredOutputScriptType).build();
else if (restoreFromKey != null)
kcg.addChain(DeterministicKeyChain.builder().spend(restoreFromKey).outputScriptType(preferredOutputScriptType).build());
else