From 46be816af72edcb1c67ede33875fe9184c35810b Mon Sep 17 00:00:00 2001 From: camthegeek Date: Mon, 10 Dec 2018 07:50:11 -0500 Subject: [PATCH] List Aeon (AEON) --- .../src/main/java/bisq/asset/coins/Aeon.java | 28 ++++++++++++ .../META-INF/services/bisq.asset.Asset | 1 + .../test/java/bisq/asset/coins/AeonTest.java | 44 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 assets/src/main/java/bisq/asset/coins/Aeon.java create mode 100644 assets/src/test/java/bisq/asset/coins/AeonTest.java diff --git a/assets/src/main/java/bisq/asset/coins/Aeon.java b/assets/src/main/java/bisq/asset/coins/Aeon.java new file mode 100644 index 00000000000..a1ded133e6d --- /dev/null +++ b/assets/src/main/java/bisq/asset/coins/Aeon.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 . + */ + +package bisq.asset.coins; + +import bisq.asset.Coin; +import bisq.asset.CryptonoteAddressValidator; + +public class Aeon extends Coin { + + public Aeon() { + super("Aeon", "AEON", new CryptonoteAddressValidator("Wm", "Xn")); + } +} diff --git a/assets/src/main/resources/META-INF/services/bisq.asset.Asset b/assets/src/main/resources/META-INF/services/bisq.asset.Asset index d093cd01a27..9154b3e3ae8 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -3,6 +3,7 @@ # See bisq.asset.Asset and bisq.asset.AssetRegistry for further details. # See https://bisq.network/list-asset for complete instructions. bisq.asset.coins.Actinium +bisq.asset.coins.Aeon bisq.asset.coins.BitcoinClashic bisq.asset.coins.BitcoinRhodium bisq.asset.coins.Bitcoin$Mainnet diff --git a/assets/src/test/java/bisq/asset/coins/AeonTest.java b/assets/src/test/java/bisq/asset/coins/AeonTest.java new file mode 100644 index 00000000000..17c5911955a --- /dev/null +++ b/assets/src/test/java/bisq/asset/coins/AeonTest.java @@ -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 . + */ + + package bisq.asset.coins; + + import bisq.asset.AbstractAssetTest; + import org.junit.Test; + + public class AeonTest extends AbstractAssetTest { + + public AeonTest() { + super(new Aeon()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("WmsSXcudnpRFjXr5qZzEY5AF64J6CpFKHYXJS92rF9WjHVjQvJxrmSGNQnSfwwJtGGeUMKvLYn5nz2yL9f6M4FN51Z5r8zt4C"); + assertValidAddress("XnY88EywrSDKiQkeeoq261dShCcz1vEDwgk3Wxz77AWf9JBBtDRMTD9Fe3BMFAVyMPY1sP44ovKKpi4UrAR26o661aAcATQ1k"); + assertValidAddress("Wmu42kYBnVJgDhBUPEtK5dicGPEtQLDUVWTHW74GYvTv1Zrki2DWqJuWKcWV4GVcqnEMgb1ZiufinCi7WXaGAmiM2Bugn9yTx"); + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress(""); + assertInvalidAddress("WmsSXcudnpRFjXr5qZzEY5AF64J6CpFKHYXJS92rF9WjHVjQvJxrmSGNQnSfwwJtGGeUMKvLYn5nz2yL9f6M4FN51Z5r8zt4"); + assertInvalidAddress("XnY88EywrSDKiQkeeoq261dShCcz1vEDwgk3Wxz77AWf9JBBtDRMTD9Fe3BMFAVyMPY1sP44ovKKpi4UrAR26o661aAcATQ1kZz"); + assertInvalidAddress("XaY88EywrSDKiQkeeoq261dShCcz1vEDwgk3Wxz77AWf9JBBtDRMTD9Fe3BMFAVyMPY1sP44ovKKpi4UrAR26o661aAcATQ1k"); + assertInvalidAddress("Wmu42kYBnVJgDhBUPEtK5dicGPEtQLDUVWTHW74GYv#vZrki2DWqJuWKcWV4GVcqnEMgb1ZiufinCi7WXaGAmiM2Bugn9yTx"); + } +}