Skip to content

Commit

Permalink
Fix NetworkParameters.fromID( incorrect-arg -> correct-arg )
Browse files Browse the repository at this point in the history
  • Loading branch information
ghubstan authored and ripcurlx committed Apr 28, 2021
1 parent 2559ba2 commit 1ea445b
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import static bisq.apitest.method.wallet.WalletTestUtil.bsqBalanceModel;
import static bisq.apitest.method.wallet.WalletTestUtil.verifyBsqBalances;
import static bisq.cli.TableFormat.formatBsqBalanceInfoTbl;
import static org.bitcoinj.core.NetworkParameters.ID_REGTEST;
import static org.bitcoinj.core.NetworkParameters.PAYMENT_PROTOCOL_ID_REGTEST;
import static org.bitcoinj.core.NetworkParameters.PAYMENT_PROTOCOL_ID_TESTNET;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
Expand Down Expand Up @@ -61,11 +61,10 @@ public void testGetUnusedBsqAddress() {
String addressString = aliceClient.getUnusedBsqAddress();
assertFalse(addressString.isEmpty());
assertTrue(addressString.startsWith("B"));
Address address = Address.fromString(NetworkParameters.fromID(PAYMENT_PROTOCOL_ID_REGTEST), addressString.substring(1));
Address address = Address.fromString(NetworkParameters.fromID(ID_REGTEST), addressString.substring(1));
NetworkParameters networkParameters = address.getParameters();
String addressNetwork = networkParameters.getPaymentProtocolId();
log.warn("TODO Fix bug causing the regtest bsq address network being set to 'testnet'.");
assertTrue(addressNetwork.equals(PAYMENT_PROTOCOL_ID_TESTNET));
assertTrue(addressNetwork.equals(PAYMENT_PROTOCOL_ID_REGTEST));
}

@Test
Expand Down

0 comments on commit 1ea445b

Please sign in to comment.