mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 10:15:52 +00:00
Fix for Android ART vs Dalvik difference.
This commit is contained in:
parent
e41e0c4a1d
commit
4ae6349f35
@ -67,7 +67,14 @@ public class MnemonicCode {
|
|||||||
|
|
||||||
/** Initialise from the included word list. Won't work on Android. */
|
/** Initialise from the included word list. Won't work on Android. */
|
||||||
public MnemonicCode() throws IOException {
|
public MnemonicCode() throws IOException {
|
||||||
this(MnemonicCode.class.getResourceAsStream("mnemonic/wordlist/english.txt"), BIP39_ENGLISH_SHA256);
|
this(openDefaultWords(), BIP39_ENGLISH_SHA256);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static InputStream openDefaultWords() throws IOException {
|
||||||
|
InputStream stream = MnemonicCode.class.getResourceAsStream("mnemonic/wordlist/english.txt");
|
||||||
|
if (stream == null)
|
||||||
|
throw new IOException(); // Handle Dalvik vs ART divergence.
|
||||||
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user