mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Merge pull request #2418 from typhoonsimon/list-litecoinplus
List LitecoinPlus (LCP)
This commit is contained in:
commit
55127398e3
38
assets/src/main/java/bisq/asset/coins/LitecoinPlus.java
Normal file
38
assets/src/main/java/bisq/asset/coins/LitecoinPlus.java
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.NetworkParametersAdapter;
|
||||
|
||||
public class LitecoinPlus extends Coin {
|
||||
|
||||
public LitecoinPlus() {
|
||||
super("LitecoinPlus", "LCP", new Base58BitcoinAddressValidator(new LitecoinPlusMainNetParams()));
|
||||
}
|
||||
|
||||
public static class LitecoinPlusMainNetParams extends NetworkParametersAdapter {
|
||||
public LitecoinPlusMainNetParams() {
|
||||
this.addressHeader = 75;
|
||||
this.p2shHeader = 8;
|
||||
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ bisq.asset.coins.IdaPay
|
||||
bisq.asset.coins.Iridium
|
||||
bisq.asset.coins.Kekcoin
|
||||
bisq.asset.coins.Litecoin
|
||||
bisq.asset.coins.LitecoinPlus
|
||||
bisq.asset.coins.LitecoinZ
|
||||
bisq.asset.coins.Lytix
|
||||
bisq.asset.coins.Mask
|
||||
|
42
assets/src/test/java/bisq/asset/coins/LitecoinPlusTest.java
Normal file
42
assets/src/test/java/bisq/asset/coins/LitecoinPlusTest.java
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class LitecoinPlusTest extends AbstractAssetTest {
|
||||
|
||||
public LitecoinPlusTest() {
|
||||
super(new LitecoinPlus());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("XGnikpGiuDTaxq9vPfDF9m9VfTpv4SnNN5");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("1LgfapHEPhZbRF9pMd5WPT35hFXcZS1USrW");
|
||||
assertInvalidAddress("LgfapHEPhZbdRF9pMd5WPT35hFXcZS1USrW");
|
||||
assertInvalidAddress("LgfapHEPhZbRF9pMd5WPT35hFXcZS1USrW#");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user