Skip to content

Commit

Permalink
Merge pull request #142 from mycelium-com/567_revertFix
Browse files Browse the repository at this point in the history
Revert: #567 BCH found in empty wallet// Added clean cache request
  • Loading branch information
sergeylappo committed Mar 1, 2018
2 parents 4c1a22a + 5c3e252 commit c23fe62
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public void onDismiss(DialogInterface dialogInterface) {
})
.create().show();
} else if (!sharedPreferences.getBoolean(BCH_INSTALLED, false) && moduleBCHInstalled) {
cleanModulesIfFirstRun(context, sharedPreferences);
new AlertDialog.Builder(context)
.setTitle(Html.fromHtml(context.getString(R.string.first_bch_installed_title)))
.setMessage(Html.fromHtml(context.getString(R.string.first_bch_installed_message)))
Expand All @@ -81,12 +80,6 @@ public void onDismiss(DialogInterface dialogInterface) {
}
}

private static void cleanModulesIfFirstRun(Context context, SharedPreferences commonSharedPreferences) {
if (!commonSharedPreferences.getBoolean(BCH_FIRST_UPDATE, false)) {
MbwManager.getInstance(context).getSpvBchFetcher().forceCleanCache();
}
}

public static void bchSynced(Context context) {
final SharedPreferences sharedPreferences = context.getSharedPreferences(BCH_PREFS, MODE_PRIVATE);
List<WalletAccount> accounts = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ class SpvBchFetcher(private val context: Context) : SpvBalanceFetcher {
WalletApplication.sendToSpv(service, WalletAccount.Type.BCHSINGLEADDRESS)
}

override fun forceCleanCache() {
val service = IntentContract.ForceCacheClean.createIntent()
WalletApplication.sendToSpv(service, WalletAccount.Type.BCHBIP44)
}

override fun requestHdWalletAccountRemoval(accountIndex: Int) {
val service = IntentContract.RemoveHdWalletAccount.createIntent(accountIndex)
WalletApplication.sendToSpv(service, WalletAccount.Type.BCHBIP44)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ public interface SpvBalanceFetcher {
Address getCurrentReceiveAddress(int accountIndex);
int getPrivateKeysCount(int accountIndex);
boolean isFirstSync();
void forceCleanCache();
}

0 comments on commit c23fe62

Please sign in to comment.