mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Merge pull request #3396 from caraphinneth/list-ani-asset
List Animecoin (ANI)
This commit is contained in:
commit
7e4b8b7d8d
36
assets/src/main/java/bisq/asset/coins/Animecoin.java
Normal file
36
assets/src/main/java/bisq/asset/coins/Animecoin.java
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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 Animecoin extends Coin {
|
||||
public Animecoin() {
|
||||
super("Animecoin", "ANI", new Base58BitcoinAddressValidator(new AnimecoinMainNetParams()));
|
||||
}
|
||||
|
||||
public static class AnimecoinMainNetParams extends NetworkParametersAdapter {
|
||||
public AnimecoinMainNetParams() {
|
||||
this.addressHeader = 23;
|
||||
this.p2shHeader = 9;
|
||||
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
@ -6,6 +6,7 @@ bisq.asset.coins.Actinium
|
||||
bisq.asset.coins.Adeptio
|
||||
bisq.asset.coins.Aeon
|
||||
bisq.asset.coins.Amitycoin
|
||||
bisq.asset.coins.Animecoin
|
||||
bisq.asset.coins.Arqma
|
||||
bisq.asset.coins.Askcoin
|
||||
bisq.asset.coins.Australiacash
|
||||
|
44
assets/src/test/java/bisq/asset/coins/AnimecoinTest.java
Normal file
44
assets/src/test/java/bisq/asset/coins/AnimecoinTest.java
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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 AnimecoinTest extends AbstractAssetTest {
|
||||
|
||||
public AnimecoinTest() {
|
||||
super(new Animecoin());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("Aa6TDuudiNh7DRzs11wEzZWiw9QBZY3Qw1");
|
||||
assertValidAddress("AdsdUhnPsJwg5NvAuyxs4EsaE2GoSHohoq");
|
||||
assertValidAddress("4s2peLxJJ2atz1tnAKpFshnVPKTmR312fr");
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("aa6TDuudiNh7DRzs11wEzZWiw9QBZY3Qw1");
|
||||
assertInvalidAddress("3s2peLxJJ2atz1tnAKpFshnVPKTmR312fr");
|
||||
assertInvalidAddress("ANNPzjj2ZYEhpyJ6p6sWeH1JXbkCSmNSd#");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user