Add MirQuiX

Create MirQuiXTest.java

Create MirQuiX.java

Update MirQuiX.java
This commit is contained in:
WG91 2019-02-11 20:30:06 +01:00 committed by WG91
parent 14d53303e6
commit fdb966ca2f
3 changed files with 74 additions and 0 deletions

View file

@ -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 MirQuiX extends Coin {
public MirQuiX() {
super("MirQuiX", "MQX", new RegexAddressValidator("^[M][a-km-zA-HJ-NP-Z1-9]{33}$"));
}
}

View file

@ -47,6 +47,7 @@ bisq.asset.coins.LitecoinZ
bisq.asset.coins.Lytix
bisq.asset.coins.Mask
bisq.asset.coins.Mile
bisq.asset.coins.MirQuiX
bisq.asset.coins.MobitGlobal
bisq.asset.coins.Monero
bisq.asset.coins.MonetaryUnit

View file

@ -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 MirQuiXTest extends AbstractAssetTest {
public MirQuiXTest() {
super(new MirQuiX());
}
@Test
public void testValidAddresses() {
assertValidAddress("MCfFP5bFtN9riJiRRnH2QRkqCDqgNVC3FX");
assertValidAddress("MEoLjNvFbNv63NtBW6eyYHUAGgLsJrpJbG");
assertValidAddress("M84gmHb7mg4PMNBpVt3BeeAWVuKBmH6vtd");
assertValidAddress("MNurUTgTSgg5ckmCcbjPrkgp7fekouLYgh");
}
@Test
public void testInvalidAddresses() {
assertInvalidAddress("MCfFP5bFtN9riJiRRnH2QRkqCDqgNVC3FX2");
assertInvalidAddress("MmEoLjNvFbNv63NtBW6eyYHUAGgLsJrpJbG");
assertInvalidAddress("M84gmHb7mg4PMNBpVt3BeeAWVuKBmH63vtd");
assertInvalidAddress("MNurUTgTSgg5ckmCcbjPrkgp7fekouLYfgh");
}
}