Skip to content

Commit

Permalink
Merge pull request #422 from KeystoneHQ/rwm-fix
Browse files Browse the repository at this point in the history
fix(rwm): import wallet navigation issue
  • Loading branch information
NanYeZhuYu authored Mar 15, 2023
2 parents 48d8e02 + da9749f commit 9f74abc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/src/main/assets/coin/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"MATIC",
"DOT",
"LTC",
"OKB",
"OKT",
"SOL",
"TRX",
"AVAX",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static void initCoinConfig() {
try {
JSONObject coinConfig = new JSONObject(ScriptLoader.readAsset("coin/config.json"));
int version = coinConfig.getInt("version");
//TODO load local config when version upgrade
SharePreferencesUtil.setCoinConfig(MainApplication.getApplication(),
mapToLocalConfig(coinConfig.getJSONArray("extraCoins")));
SharePreferencesUtil.setCoinConfigVersion(MainApplication.getApplication(), version);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import static com.keystone.cold.viewmodel.SetupVaultViewModel.VAULT_STATE_CREATING_FAILED;
import static com.keystone.cold.viewmodel.SetupVaultViewModel.VAULT_STATE_NOT_CREATE;

import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
Expand All @@ -52,6 +53,7 @@
import com.keystone.cold.databinding.CreateVaultModalBinding;
import com.keystone.cold.databinding.MnemonicInputFragmentBinding;
import com.keystone.cold.databinding.ModalWithTwoButtonBinding;
import com.keystone.cold.remove_wallet_mode.ui.MainActivity;
import com.keystone.cold.remove_wallet_mode.ui.SetupVaultActivity;
import com.keystone.cold.remove_wallet_mode.ui.fragment.unlock.VerifyMnemonicFragment;
import com.keystone.cold.remove_wallet_mode.viewmodel.SetupVaultViewModel;
Expand Down Expand Up @@ -291,13 +293,17 @@ void subscribeVaultState(MutableLiveData<Integer> vaultState) {
if (dialog != null && dialog.getDialog() != null && dialog.getDialog().isShowing()) {
dialog.dismiss();
}
Bundle data = new Bundle();

boolean isSetupProcess = ((SetupVaultActivity) mActivity).inSetupProcess;
data.putBoolean(IS_SETUP_VAULT, isSetupProcess);
if (isSetupProcess) {
if (!isSetupProcess) {
startActivity(new Intent(mActivity, MainActivity.class));
mActivity.finish();
} else {
Bundle data = new Bundle();
data.putBoolean(IS_SETUP_VAULT, true);
viewModel.setVaultCreateStep(VAULT_CREATE_STEP_DONE);
navigate(R.id.action_to_setupSelectWalletFragment, data);
}
navigate(R.id.action_to_setupSelectWalletFragment, data);
};

//List<CoinEntity> coins = PresetData.generateCoins(mActivity);
Expand Down

0 comments on commit 9f74abc

Please sign in to comment.