forked from Qortal/qortal
Don't sync, save, or load null seed wallets. They only act as a placeholder wallet when redeeming/refunding a P2SH.
This commit is contained in:
parent
e8c29226a1
commit
f26267e572
@ -50,6 +50,10 @@ public class PirateChainWalletController extends Thread {
|
||||
// Nothing to do yet
|
||||
continue;
|
||||
}
|
||||
if (this.currentWallet.isNullSeedWallet()) {
|
||||
// Don't sync the null seed wallet
|
||||
continue;
|
||||
}
|
||||
|
||||
LOGGER.debug("Syncing Pirate Chain wallet...");
|
||||
String response = LiteWalletJni.execute("sync", "");
|
||||
|
@ -439,7 +439,6 @@ public class PirateChain extends Bitcoiny {
|
||||
PirateChainWalletController walletController = PirateChainWalletController.getInstance();
|
||||
walletController.initNullSeedWallet();
|
||||
walletController.ensureInitialized();
|
||||
walletController.ensureSynchronized();
|
||||
|
||||
walletController.getCurrentWallet().unlock();
|
||||
|
||||
@ -491,7 +490,6 @@ public class PirateChain extends Bitcoiny {
|
||||
PirateChainWalletController walletController = PirateChainWalletController.getInstance();
|
||||
walletController.initNullSeedWallet();
|
||||
walletController.ensureInitialized();
|
||||
walletController.ensureSynchronized();
|
||||
|
||||
walletController.getCurrentWallet().unlock();
|
||||
|
||||
|
@ -190,6 +190,10 @@ public class PirateWallet {
|
||||
LOGGER.info("Error: can't save wallet, because no wallet it initialized");
|
||||
return false;
|
||||
}
|
||||
if (this.isNullSeedWallet()) {
|
||||
// Don't save wallets that have a null seed
|
||||
return false;
|
||||
}
|
||||
|
||||
// Encrypt first (will do nothing if already encrypted)
|
||||
this.encrypt();
|
||||
@ -218,6 +222,10 @@ public class PirateWallet {
|
||||
}
|
||||
|
||||
public String load() throws IOException {
|
||||
if (this.isNullSeedWallet()) {
|
||||
// Don't load wallets that have a null seed
|
||||
return null;
|
||||
}
|
||||
Path walletPath = this.getCurrentWalletPath();
|
||||
if (!Files.exists(walletPath)) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user