mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 18:26:43 +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 seedHex;
|
||||
if(qrHex.endsWith("0ec")) {
|
||||
seedHex = qrHex.substring(3, qrHex.length() - 3);
|
||||
if(qrHex.endsWith("0ec11ec11")) {
|
||||
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 {
|
||||
seedHex = qrHex.substring(3, qrHex.length() - 1);
|
||||
seedHex = qrHex.substring(3, qrHex.length() - 1); //24 word
|
||||
}
|
||||
|
||||
byte[] seed = Utils.hexToBytes(seedHex);
|
||||
|
|
Loading…
Reference in a new issue