From fee042679938316f034ceee137cfa056be566ffd Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 2 Oct 2020 16:01:31 +0200 Subject: [PATCH] fix case sensitive legacy addresses --- src/main/java/com/sparrowwallet/drongo/address/Address.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/drongo/address/Address.java b/src/main/java/com/sparrowwallet/drongo/address/Address.java index 0aeecc3..90bf9ca 100644 --- a/src/main/java/com/sparrowwallet/drongo/address/Address.java +++ b/src/main/java/com/sparrowwallet/drongo/address/Address.java @@ -85,8 +85,6 @@ public abstract class Address { Exception nested = null; if(address != null) { - address = address.toLowerCase(); - if(network.hasP2PKHAddressPrefix(address) || network.hasP2SHAddressPrefix(address)) { try { 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 { Bech32.Bech32Data data = Bech32.decode(address); if(data.hrp.equals(network.getBech32AddressHRP())) {