mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 10:06:45 +00:00
fix case sensitive legacy addresses
This commit is contained in:
parent
e912e8a512
commit
fee0426799
1 changed files with 1 additions and 3 deletions
|
@ -85,8 +85,6 @@ public abstract class Address {
|
||||||
Exception nested = null;
|
Exception nested = null;
|
||||||
|
|
||||||
if(address != null) {
|
if(address != null) {
|
||||||
address = address.toLowerCase();
|
|
||||||
|
|
||||||
if(network.hasP2PKHAddressPrefix(address) || network.hasP2SHAddressPrefix(address)) {
|
if(network.hasP2PKHAddressPrefix(address) || network.hasP2SHAddressPrefix(address)) {
|
||||||
try {
|
try {
|
||||||
byte[] decodedBytes = Base58.decodeChecked(address);
|
byte[] decodedBytes = Base58.decodeChecked(address);
|
||||||
|
@ -105,7 +103,7 @@ public abstract class Address {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(address.startsWith(network.getBech32AddressHRP())) {
|
if(address.toLowerCase().startsWith(network.getBech32AddressHRP())) {
|
||||||
try {
|
try {
|
||||||
Bech32.Bech32Data data = Bech32.decode(address);
|
Bech32.Bech32Data data = Bech32.decode(address);
|
||||||
if(data.hrp.equals(network.getBech32AddressHRP())) {
|
if(data.hrp.equals(network.getBech32AddressHRP())) {
|
||||||
|
|
Loading…
Reference in a new issue