Commit cbddafb6 authored by T Dev. D's avatar T Dev. D 😎
Browse files

AddressFactory: use reset()

parent 2cd35a6a
......@@ -176,8 +176,6 @@ public class PayloadUtil {
PrefsUtil.getInstance(context).clear();
AddressFactory.getInstance().wipe();
RicochetMeta.getInstance(context).empty();
RicochetMeta.getInstance(context).setIndex(0);
......@@ -185,6 +183,9 @@ public class PayloadUtil {
HD_WalletFactory.getInstance(context).clear();
AddressFactory.getInstance().reset();
AddressFactory.getInstance().wipe();
File dir = context.getDir(dataDir, Context.MODE_PRIVATE);
File datfile = new File(dir, strFilename);
File tmpfile = new File(dir, strTmpFilename);
......
......@@ -41,7 +41,7 @@ public class AddressFactory extends AddressFactoryGeneric {
account2xpub = new HashMap<Integer,String>();
}
public void reset() {
public void init() {
Log.d(TAG, "reset");
HD_Wallet bip44w = HD_WalletFactory.getInstance(context).get();
HD_Wallet bip49w = BIP49Util.getInstance(context).getWallet();
......
......@@ -114,13 +114,6 @@ public class AppUtil {
}
*/
try {
PayloadUtil.getInstance(context).wipe();
}
catch(IOException ioe) {
ioe.printStackTrace();
}
BIP49Util.getInstance(context).reset();
BIP84Util.getInstance(context).reset();
BIP47Util.getInstance(context).reset();
......@@ -155,6 +148,14 @@ public class AppUtil {
catch(IOException ioe) {
ioe.printStackTrace();
}
try {
PayloadUtil.getInstance(context).wipe();
}
catch(IOException ioe) {
ioe.printStackTrace();
}
}
public void restartApp() {
......
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