Fix Import Chinese Seeds
@@ -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) {
