Modify ImportHDSeed Success Refresh
MODIFY
bither-android/src/net/bither/BitherSetting.java
bither-android/src/net/bither/BitherSetting.java
@@ -68,6 +68,7 @@ public class BitherSetting {
public static final int IMPORT_BIP38PRIVATE_KEY_REQUEST_CODE = 1357;
public static final int IMPORT_HDM_COLD_SEED_REQUEST_CODE = 1358;
public static final int IMPORT_HD_ACCOUNT_SEED_REQUEST_CODE = 1359;
+ public static final int IMPORT_ACCOUNT_SEED_FROM_PHRASE_REQUEST_CODE = 1340;
public static final int WIRELESS_SETTINGS_CODE = 537;
public static final int SCAN_ALL_IN_BITHER_COLD_REUEST_CODE = 784;
public static final String NOTIFICATION_ADDRESS = "tab_intent";

MODIFY
bither-android/src/net/bither/activity/cold/ColdAdvanceActivity.java
bither-android/src/net/bither/activity/cold/ColdAdvanceActivity.java
@@ -616,7 +616,7 @@ public class ColdAdvanceActivity extends SwipeRightFragmentActivity {
Intent intent = new Intent(this, HdmImportWordListActivity.class);
intent.putExtra(BitherSetting.INTENT_REF.IMPORT_HDM_SEED_TYPE, ImportHDSeed
.ImportHDSeedType.HDMColdPhrase);
- startActivity(intent);
+ startActivityForResult(intent, BitherSetting.INTENT_REF.IMPORT_ACCOUNT_SEED_FROM_PHRASE_REQUEST_CODE);
}
private void importHDFromQRCode() {
@@ -632,8 +632,7 @@ public class ColdAdvanceActivity extends SwipeRightFragmentActivity {
Intent intent = new Intent(this, HdmImportWordListActivity.class);
intent.putExtra(BitherSetting.INTENT_REF.IMPORT_HD_SEED_TYPE, ImportHDSeed
.ImportHDSeedType.HDSeedPhrase);
- startActivity(intent);
-
+ startActivityForResult(intent, BitherSetting.INTENT_REF.IMPORT_ACCOUNT_SEED_FROM_PHRASE_REQUEST_CODE);
}
private void importPrivateKeyFromQRCode() {
@@ -780,6 +779,8 @@ public class ColdAdvanceActivity extends SwipeRightFragmentActivity {
DropdownMessage.showDropdownMessage(ColdAdvanceActivity.this, R.string.import_hd_account_seed_format_error);
}
break;
+ case BitherSetting.INTENT_REF.IMPORT_ACCOUNT_SEED_FROM_PHRASE_REQUEST_CODE:
+ ssvImportPrivateKey.loadData();
}
}

MODIFY
bither-android/src/net/bither/activity/hot/HotAdvanceActivity.java
bither-android/src/net/bither/activity/hot/HotAdvanceActivity.java
@@ -1209,8 +1209,7 @@ public class HotAdvanceActivity extends SwipeRightFragmentActivity {
private void importHDFromPhrase() {
Intent intent = new Intent(this, HdmImportWordListActivity.class);
intent.putExtra(BitherSetting.INTENT_REF.IMPORT_HD_SEED_TYPE, ImportHDSeed.ImportHDSeedType.HDSeedPhrase);
- startActivity(intent);
-
+ startActivityForResult(intent, BitherSetting.INTENT_REF.IMPORT_ACCOUNT_SEED_FROM_PHRASE_REQUEST_CODE);
}
private void importPrivateKeyFromQrCode(boolean isFromBip38) {
@@ -1341,6 +1340,8 @@ public class HotAdvanceActivity extends SwipeRightFragmentActivity {
}
}).show();
break;
+ case BitherSetting.INTENT_REF.IMPORT_ACCOUNT_SEED_FROM_PHRASE_REQUEST_CODE:
+ ssvImportPrivateKey.loadData();
default:
super.onActivityResult(requestCode, resultCode, data);
}
@@ -1431,6 +1432,8 @@ public class HotAdvanceActivity extends SwipeRightFragmentActivity {
public void showImportSuccess() {
hasAnyAction = false;
+ ssvImportPrivateKey.loadData();
+ ssvImprotBip38Key.loadData();
DropdownMessage.showDropdownMessage(HotAdvanceActivity.this,
R.string.import_private_key_qr_code_success, new Runnable() {
@Override

MODIFY
bither-android/src/net/bither/factory/ImportHDSeedAndroid.java
bither-android/src/net/bither/factory/ImportHDSeedAndroid.java
@@ -144,14 +144,18 @@ public class ImportHDSeedAndroid extends ImportHDSeed {
dp.dismiss();
}
if (activity instanceof HotAdvanceActivity) {
- ((HotAdvanceActivity) activity).showImportSuccess();
+ HotAdvanceActivity hotAdvanceActivity = (HotAdvanceActivity) activity;
+ hotAdvanceActivity.showImportSuccess();
}
if (activity instanceof ColdAdvanceActivity) {
- ((ColdAdvanceActivity) activity).showImportSuccess();
+ ColdAdvanceActivity coldAdvanceActivity = (ColdAdvanceActivity) activity;
+ coldAdvanceActivity.showImportSuccess();
}
+
if (activity instanceof HdmImportWordListActivity) {
HdmImportWordListActivity hdmImportWordListActivity = (HdmImportWordListActivity) activity;
hdmImportWordListActivity.showImportSuccess();
+ hdmImportWordListActivity.setResult(Activity.RESULT_OK);
hdmImportWordListActivity.finish();
}
}

Modify ImportHDSeed Success Refresh