mirror of
https://github.com/sparrowwallet/hummingbird.git
synced 2024-11-02 18:46:45 +00:00
covert fragments to lowercase for legacy decoding, bump to v1.5.4
This commit is contained in:
parent
2b24027b16
commit
e7dabb8884
3 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ It contains both the classes to represent a UR, and a UR encoder and decoder to
|
||||||
Hummingbird is hosted in Maven Central and can be added as a dependency with the following:
|
Hummingbird is hosted in Maven Central and can be added as a dependency with the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
implementation('com.sparrowwallet:hummingbird:1.5.3')
|
implementation('com.sparrowwallet:hummingbird:1.5.4')
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
@ -16,7 +16,7 @@ apply plugin: 'com.bmuschko.nexus'
|
||||||
|
|
||||||
archivesBaseName = 'hummingbird'
|
archivesBaseName = 'hummingbird'
|
||||||
group 'com.sparrowwallet'
|
group 'com.sparrowwallet'
|
||||||
version '1.5.3'
|
version '1.5.4'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
|
@ -8,7 +8,7 @@ public class LegacyURDecoder {
|
||||||
private final Set<String> fragments = new LinkedHashSet<>();
|
private final Set<String> fragments = new LinkedHashSet<>();
|
||||||
|
|
||||||
public void receivePart(String fragment) {
|
public void receivePart(String fragment) {
|
||||||
fragments.add(fragment);
|
fragments.add(fragment.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isComplete() {
|
public boolean isComplete() {
|
||||||
|
@ -54,7 +54,7 @@ public class LegacyURDecoder {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Last component is always fragment payload in both legacy and current
|
//Last component is always fragment payload in both legacy and current
|
||||||
String payload = components[components.length-1];
|
String payload = components[components.length-1].toLowerCase();
|
||||||
|
|
||||||
//BC32 will never contain the following characters
|
//BC32 will never contain the following characters
|
||||||
if(payload.indexOf('b') > -1 || payload.indexOf('i') > -1 || payload.indexOf('o') > -1) {
|
if(payload.indexOf('b') > -1 || payload.indexOf('i') > -1 || payload.indexOf('o') > -1) {
|
||||||
|
|
Loading…
Reference in a new issue