Fix Import Chinese Seeds
MODIFY
bither-android/src/net/bither/activity/cold/HdmImportWordListActivity.java
bither-android/src/net/bither/activity/cold/HdmImportWordListActivity.java
@@ -188,6 +188,7 @@ public class HdmImportWordListActivity extends SwipeRightFragmentActivity implem
private void isZhTw() {
try {
+ int zhCnCount = 0;
for (String word: words) {
mnemonic = MnemonicCode.instanceForWord(new MnemonicCodeAndroid(), word);
ArrayList<String> zhCnWorsList = mnemonic.getWordListForInputStream(BitherApplication.mContext.getResources().openRawResource(R.raw.mnemonic_wordlist_zh_cn));
@@ -196,6 +197,13 @@ public class HdmImportWordListActivity extends SwipeRightFragmentActivity implem
mnemonic.setWordList(zhTwWorsList, MnemonicWordList.ZhTw);
return;
}
+ if (zhCnWorsList.contains(word)) {
+ zhCnCount += 1;
+ }
+ if (zhCnCount == words.size()) {
+ mnemonic.setWordList(zhCnWorsList, MnemonicWordList.ZhCN);
+ return;
+ }
}
return;
} catch (IOException e) {

Fix Import Chinese Seeds