3
0
mirror of https://github.com/Qortal/qortal.git synced 2025-02-12 02:05:50 +00:00

Validate wallet initialization result when restoring existing wallet.

This commit is contained in:
CalDescent 2022-08-17 19:27:13 +01:00
parent 2ea6921b66
commit a4fade0157

View File

@ -115,7 +115,11 @@ public class PirateWallet {
} else {
// Restore existing wallet
LiteWalletJni.initfromb64(serverUri, params, wallet, saplingOutput64, saplingSpend64);
String response = LiteWalletJni.initfromb64(serverUri, params, wallet, saplingOutput64, saplingSpend64);
if (response != null && !response.contains("\"initalized\":true")) {
LOGGER.info("Unable to initialize Pirate Chain wallet: {}", response);
return false;
}
this.seedPhrase = inputSeedPhrase;
}