mirror of
https://github.com/Qortal/qortal.git
synced 2025-02-12 10:15:49 +00:00
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
|
// Nothing to do yet
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (this.currentWallet.isNullSeedWallet()) {
|
||||||
|
// Don't sync the null seed wallet
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
LOGGER.debug("Syncing Pirate Chain wallet...");
|
LOGGER.debug("Syncing Pirate Chain wallet...");
|
||||||
String response = LiteWalletJni.execute("sync", "");
|
String response = LiteWalletJni.execute("sync", "");
|
||||||
|
@ -439,7 +439,6 @@ public class PirateChain extends Bitcoiny {
|
|||||||
PirateChainWalletController walletController = PirateChainWalletController.getInstance();
|
PirateChainWalletController walletController = PirateChainWalletController.getInstance();
|
||||||
walletController.initNullSeedWallet();
|
walletController.initNullSeedWallet();
|
||||||
walletController.ensureInitialized();
|
walletController.ensureInitialized();
|
||||||
walletController.ensureSynchronized();
|
|
||||||
|
|
||||||
walletController.getCurrentWallet().unlock();
|
walletController.getCurrentWallet().unlock();
|
||||||
|
|
||||||
@ -491,7 +490,6 @@ public class PirateChain extends Bitcoiny {
|
|||||||
PirateChainWalletController walletController = PirateChainWalletController.getInstance();
|
PirateChainWalletController walletController = PirateChainWalletController.getInstance();
|
||||||
walletController.initNullSeedWallet();
|
walletController.initNullSeedWallet();
|
||||||
walletController.ensureInitialized();
|
walletController.ensureInitialized();
|
||||||
walletController.ensureSynchronized();
|
|
||||||
|
|
||||||
walletController.getCurrentWallet().unlock();
|
walletController.getCurrentWallet().unlock();
|
||||||
|
|
||||||
|
@ -190,6 +190,10 @@ public class PirateWallet {
|
|||||||
LOGGER.info("Error: can't save wallet, because no wallet it initialized");
|
LOGGER.info("Error: can't save wallet, because no wallet it initialized");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (this.isNullSeedWallet()) {
|
||||||
|
// Don't save wallets that have a null seed
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Encrypt first (will do nothing if already encrypted)
|
// Encrypt first (will do nothing if already encrypted)
|
||||||
this.encrypt();
|
this.encrypt();
|
||||||
@ -218,6 +222,10 @@ public class PirateWallet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String load() throws IOException {
|
public String load() throws IOException {
|
||||||
|
if (this.isNullSeedWallet()) {
|
||||||
|
// Don't load wallets that have a null seed
|
||||||
|
return null;
|
||||||
|
}
|
||||||
Path walletPath = this.getCurrentWalletPath();
|
Path walletPath = this.getCurrentWalletPath();
|
||||||
if (!Files.exists(walletPath)) {
|
if (!Files.exists(walletPath)) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user