Make codacy happy

This commit is contained in:
Oscar Guindzberg 2020-09-09 18:48:58 -03:00
parent 2a33095021
commit 93f9f83136
No known key found for this signature in database
GPG Key ID: 209796BF2E1D4F75
5 changed files with 3 additions and 6 deletions

View File

@ -17,7 +17,6 @@
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.BitcoinAddressValidator;
import bisq.asset.Coin;

View File

@ -37,7 +37,6 @@ import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Context;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.InsufficientMoneyException;
import org.bitcoinj.core.LegacyAddress;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.listeners.TransactionConfidenceEventListener;
import org.bitcoinj.script.ScriptException;

View File

@ -107,11 +107,12 @@ public class BsqFormatter implements CoinFormatter {
}
public LegacyAddress getAddressFromBsqAddress(String encoded) {
String maybeUpdatedEncoded = encoded;
if (useBsqAddressFormat)
encoded = encoded.substring(prefix.length(), encoded.length());
maybeUpdatedEncoded = encoded.substring(prefix.length(), encoded.length());
try {
return LegacyAddress.fromBase58(Config.baseCurrencyNetworkParameters(), encoded);
return LegacyAddress.fromBase58(Config.baseCurrencyNetworkParameters(), maybeUpdatedEncoded);
} catch (AddressFormatException e) {
throw new RuntimeException(e);
}

View File

@ -23,7 +23,6 @@ import bisq.common.config.Config;
import org.bitcoinj.core.Address;
import org.bitcoinj.core.AddressFormatException;
import org.bitcoinj.core.LegacyAddress;
import javax.inject.Inject;

View File

@ -70,7 +70,6 @@ import bisq.common.util.Utilities;
import org.bitcoinj.core.Address;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.LegacyAddress;
import org.bitcoinj.core.TransactionConfidence;
import org.bitcoinj.uri.BitcoinURI;
import org.bitcoinj.utils.Fiat;