mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 01:56:44 +00:00
support compact seedqrs with high ec
This commit is contained in:
parent
fe19c86544
commit
b26c5e5218
1 changed files with 5 additions and 3 deletions
|
@ -41,10 +41,12 @@ public class SeedQR {
|
||||||
|
|
||||||
String qrHex = Utils.bytesToHex(compactSeedQr);
|
String qrHex = Utils.bytesToHex(compactSeedQr);
|
||||||
String seedHex;
|
String seedHex;
|
||||||
if(qrHex.endsWith("0ec")) {
|
if(qrHex.endsWith("0ec11ec11")) {
|
||||||
seedHex = qrHex.substring(3, qrHex.length() - 3);
|
seedHex = qrHex.substring(3, qrHex.length() - 9); //12 word, high EC
|
||||||
|
} else if(qrHex.endsWith("0ec")) {
|
||||||
|
seedHex = qrHex.substring(3, qrHex.length() - 3); //12 word, low EC
|
||||||
} else {
|
} else {
|
||||||
seedHex = qrHex.substring(3, qrHex.length() - 1);
|
seedHex = qrHex.substring(3, qrHex.length() - 1); //24 word
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] seed = Utils.hexToBytes(seedHex);
|
byte[] seed = Utils.hexToBytes(seedHex);
|
||||||
|
|
Loading…
Reference in a new issue