Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List PENG (PENG) #2986

Merged
merged 1 commit into from Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions assets/src/main/java/bisq/asset/coins/PENG.java
@@ -0,0 +1,28 @@
/*
* 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.Coin;
import bisq.asset.RegexAddressValidator;

public class PENG extends Coin {

public PENG() {
super("PENG Coin", "PENG", new RegexAddressValidator("^[P][a-km-zA-HJ-NP-Z1-9]{33}$"));
}
}
Expand Up @@ -72,6 +72,7 @@ bisq.asset.coins.Neos
bisq.asset.coins.Noir
bisq.asset.coins.ParsiCoin
bisq.asset.coins.Particl
bisq.asset.coins.PENG
bisq.asset.coins.Persona
bisq.asset.coins.Pinkcoin
bisq.asset.coins.PIVX
Expand Down
45 changes: 45 additions & 0 deletions assets/src/test/java/bisq/asset/coins/PENGTest.java
@@ -0,0 +1,45 @@
/*
* 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 PENGTest extends AbstractAssetTest {

public PENGTest() {
super(new PENG());
}

@Test
public void testValidAddresses() {
assertValidAddress("P9KqnVS9UpcJmLtCF1j4SV3fcccMuGEbhs");
assertValidAddress("PUTXyY73s3HDvEzNJQekXMnjNjTrzFBzE2");
assertValidAddress("PEfabj5DzRj6WBpc3jtVDorsVM5nddDxie");
assertValidAddress("PAvXbSUAdCyd9MEtDPYYSmezmeLGL1HcjG");
}

@Test
public void testInvalidAddresses() {
assertInvalidAddress("Pp9KqnVS9UpcJmLtCF1j4SV3fcccMuGEbhs");
assertInvalidAddress("PqUTXyY73s3HDvEzNJQekXMnjNjTrzFBzE2");
assertInvalidAddress("P8Efabj5DzRj6WBpc3jtVDorsVM5nddDxie");
assertInvalidAddress("P9AvXbSUAdCyd9MEtDPYYSmezmeLGL1HcjG");
}
}