From d2b13196da684a4b186a857117386cfec43d6855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Lon=C4=8Dar?= Date: Thu, 17 Oct 2019 00:13:49 +0200 Subject: [PATCH 1/7] Adding Dubaicoin DBIX --- .../main/java/bisq/asset/coins/Dubaicoin.java | 28 +++++++++++++ .../META-INF/services/bisq.asset.Asset | 1 + .../java/bisq/asset/coins/DubaicoinTest.java | 42 +++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 assets/src/main/java/bisq/asset/coins/Dubaicoin.java create mode 100644 assets/src/test/java/bisq/asset/coins/DubaicoinTest.java diff --git a/assets/src/main/java/bisq/asset/coins/Dubaicoin.java b/assets/src/main/java/bisq/asset/coins/Dubaicoin.java new file mode 100644 index 00000000000..e323c97a552 --- /dev/null +++ b/assets/src/main/java/bisq/asset/coins/Dubaicoin.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.RegexAddressValidator; + +public class Dubaicoin extends Coin { + + public Dubaicoin() { + super("Dubaicoin", "DBIX", new RegexAddressValidator("^0x[0-9a-fA-F]{40}$")); + } +} \ No newline at end of file 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 5bcdee49d75..c56bfc4e56a 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -40,6 +40,7 @@ bisq.asset.coins.Doichain bisq.asset.coins.Donu bisq.asset.coins.Dragonglass bisq.asset.coins.DSTRA +bisq.asset.coins.Dubaicoin bisq.asset.coins.Emercoin bisq.asset.coins.Ergo bisq.asset.coins.Ether diff --git a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java new file mode 100644 index 00000000000..2d8b612e8aa --- /dev/null +++ b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java @@ -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 . + */ + +package bisq.asset.coins; + +import bisq.asset.AbstractAssetTest; + +public class DubaicoinTest extends AbstractAssetTest { + + public DubaicoinTest() { + super(new Dubaicoin()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("0xb0fbfba46458d04d1a9c1ad4943477cd4a6d5379"); + assertValidAddress("0x66d434D922516177aD0B2F4623F5D876cA1b5A0b"); + assertValidAddress("0x45394189EB1aB713338Fc0693342042f137C6DCc"); + + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); + assertInvalidAddress("N22FRU9f3fx7Hty641D5cg95kRK6S3sbf3"); + assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); + } +} \ No newline at end of file From 90d00503211b68eeeb35356a4cbd008d163aa475 Mon Sep 17 00:00:00 2001 From: DbixDev Date: Thu, 17 Oct 2019 00:49:37 +0200 Subject: [PATCH 2/7] fix test --- assets/src/test/java/bisq/asset/coins/DubaicoinTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java index 2d8b612e8aa..bf4575fe7af 100644 --- a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java +++ b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java @@ -19,6 +19,8 @@ import bisq.asset.AbstractAssetTest; +import org.junit.Test; + public class DubaicoinTest extends AbstractAssetTest { public DubaicoinTest() { @@ -39,4 +41,4 @@ public void testInvalidAddresses() { assertInvalidAddress("N22FRU9f3fx7Hty641D5cg95kRK6S3sbf3"); assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); } -} \ No newline at end of file +} From 64759d3aa38fa588e4ff45d5c0ba134af30d2f5a Mon Sep 17 00:00:00 2001 From: DbixDev Date: Tue, 5 Nov 2019 13:57:58 +0100 Subject: [PATCH 3/7] List Dubaicoin (DBIX) --- assets/src/main/java/bisq/asset/coins/Dubaicoin.java | 1 + assets/src/main/resources/META-INF/services/bisq.asset.Asset | 2 +- assets/src/test/java/bisq/asset/coins/DubaicoinTest.java | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/src/main/java/bisq/asset/coins/Dubaicoin.java b/assets/src/main/java/bisq/asset/coins/Dubaicoin.java index e323c97a552..4d98623c9e2 100644 --- a/assets/src/main/java/bisq/asset/coins/Dubaicoin.java +++ b/assets/src/main/java/bisq/asset/coins/Dubaicoin.java @@ -15,6 +15,7 @@ * along with Bisq. If not, see . */ + package bisq.asset.coins; import bisq.asset.Coin; 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 c56bfc4e56a..b0c31e06251 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -40,7 +40,7 @@ bisq.asset.coins.Doichain bisq.asset.coins.Donu bisq.asset.coins.Dragonglass bisq.asset.coins.DSTRA -bisq.asset.coins.Dubaicoin +bisq.asset.coins.Dubaicoin bisq.asset.coins.Emercoin bisq.asset.coins.Ergo bisq.asset.coins.Ether diff --git a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java index bf4575fe7af..78bea1d9cd9 100644 --- a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java +++ b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java @@ -15,6 +15,7 @@ * along with Bisq. If not, see . */ + package bisq.asset.coins; import bisq.asset.AbstractAssetTest; From 0e75fbad771e82831575b327d67c0c61fe2b58cb Mon Sep 17 00:00:00 2001 From: DbixDev Date: Tue, 5 Nov 2019 14:22:04 +0100 Subject: [PATCH 4/7] fix merging files --- .../main/java/bisq/asset/coins/Dubaicoin.java | 47 +++++----- .../META-INF/services/bisq.asset.Asset | 1 - .../java/bisq/asset/coins/DubaicoinTest.java | 87 +++++++++---------- 3 files changed, 66 insertions(+), 69 deletions(-) diff --git a/assets/src/main/java/bisq/asset/coins/Dubaicoin.java b/assets/src/main/java/bisq/asset/coins/Dubaicoin.java index 4d98623c9e2..c14f3643d1f 100644 --- a/assets/src/main/java/bisq/asset/coins/Dubaicoin.java +++ b/assets/src/main/java/bisq/asset/coins/Dubaicoin.java @@ -1,29 +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 . - */ +// * 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; +// package bisq.asset.coins; -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; +// import bisq.asset.Coin; +// import bisq.asset.RegexAddressValidator; -public class Dubaicoin extends Coin { +// public class Dubaicoin extends Coin { - public Dubaicoin() { - super("Dubaicoin", "DBIX", new RegexAddressValidator("^0x[0-9a-fA-F]{40}$")); - } -} \ No newline at end of file +// public Dubaicoin() { +// super("Dubaicoin", "DBIX", new RegexAddressValidator("^0x[0-9a-fA-F]{40}$")); +// } +// } \ No newline at end of file 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 b0c31e06251..5bcdee49d75 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -40,7 +40,6 @@ bisq.asset.coins.Doichain bisq.asset.coins.Donu bisq.asset.coins.Dragonglass bisq.asset.coins.DSTRA -bisq.asset.coins.Dubaicoin bisq.asset.coins.Emercoin bisq.asset.coins.Ergo bisq.asset.coins.Ether diff --git a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java index 78bea1d9cd9..456a4b10403 100644 --- a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java +++ b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java @@ -1,45 +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 DubaicoinTest extends AbstractAssetTest { - - public DubaicoinTest() { - super(new Dubaicoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0xb0fbfba46458d04d1a9c1ad4943477cd4a6d5379"); - assertValidAddress("0x66d434D922516177aD0B2F4623F5D876cA1b5A0b"); - assertValidAddress("0x45394189EB1aB713338Fc0693342042f137C6DCc"); +// /* +// * 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 DubaicoinTest extends AbstractAssetTest { + +// public DubaicoinTest() { +// super(new Dubaicoin()); +// } + +// @Test +// public void testValidAddresses() { +// assertValidAddress("0xb0fbfba46458d04d1a9c1ad4943477cd4a6d5379"); +// assertValidAddress("0x66d434D922516177aD0B2F4623F5D876cA1b5A0b"); +// assertValidAddress("0x45394189EB1aB713338Fc0693342042f137C6DCc"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); - assertInvalidAddress("N22FRU9f3fx7Hty641D5cg95kRK6S3sbf3"); - assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); - } -} +// } + +// @Test +// public void testInvalidAddresses() { +// assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); +// assertInvalidAddress("N22FRU9f3fx7Hty641D5cg95kRK6S3sbf3"); +// assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); +// } +// } From ddb4ef3cdd1838b5f04d70fcec2ab48500b065ec Mon Sep 17 00:00:00 2001 From: DbixDev Date: Tue, 5 Nov 2019 14:23:23 +0100 Subject: [PATCH 5/7] List Dubaicoin (DBIX) --- .../main/java/bisq/asset/coins/Dubaicoin.java | 48 ++++++------- .../META-INF/services/bisq.asset.Asset | 1 + .../java/bisq/asset/coins/DubaicoinTest.java | 72 +++++++++---------- 3 files changed, 61 insertions(+), 60 deletions(-) diff --git a/assets/src/main/java/bisq/asset/coins/Dubaicoin.java b/assets/src/main/java/bisq/asset/coins/Dubaicoin.java index c14f3643d1f..e323c97a552 100644 --- a/assets/src/main/java/bisq/asset/coins/Dubaicoin.java +++ b/assets/src/main/java/bisq/asset/coins/Dubaicoin.java @@ -1,28 +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 . + */ -// * 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; -// package bisq.asset.coins; +import bisq.asset.Coin; +import bisq.asset.RegexAddressValidator; -// import bisq.asset.Coin; -// import bisq.asset.RegexAddressValidator; +public class Dubaicoin extends Coin { -// public class Dubaicoin extends Coin { - -// public Dubaicoin() { -// super("Dubaicoin", "DBIX", new RegexAddressValidator("^0x[0-9a-fA-F]{40}$")); -// } -// } \ No newline at end of file + public Dubaicoin() { + super("Dubaicoin", "DBIX", new RegexAddressValidator("^0x[0-9a-fA-F]{40}$")); + } +} \ No newline at end of file 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 5bcdee49d75..c56bfc4e56a 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -40,6 +40,7 @@ bisq.asset.coins.Doichain bisq.asset.coins.Donu bisq.asset.coins.Dragonglass bisq.asset.coins.DSTRA +bisq.asset.coins.Dubaicoin bisq.asset.coins.Emercoin bisq.asset.coins.Ergo bisq.asset.coins.Ether diff --git a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java index 456a4b10403..bf4575fe7af 100644 --- a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java +++ b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java @@ -1,44 +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 . -// */ +/* + * 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; +package bisq.asset.coins; -// import bisq.asset.AbstractAssetTest; +import bisq.asset.AbstractAssetTest; -// import org.junit.Test; +import org.junit.Test; -// public class DubaicoinTest extends AbstractAssetTest { +public class DubaicoinTest extends AbstractAssetTest { -// public DubaicoinTest() { -// super(new Dubaicoin()); -// } + public DubaicoinTest() { + super(new Dubaicoin()); + } -// @Test -// public void testValidAddresses() { -// assertValidAddress("0xb0fbfba46458d04d1a9c1ad4943477cd4a6d5379"); -// assertValidAddress("0x66d434D922516177aD0B2F4623F5D876cA1b5A0b"); -// assertValidAddress("0x45394189EB1aB713338Fc0693342042f137C6DCc"); + @Test + public void testValidAddresses() { + assertValidAddress("0xb0fbfba46458d04d1a9c1ad4943477cd4a6d5379"); + assertValidAddress("0x66d434D922516177aD0B2F4623F5D876cA1b5A0b"); + assertValidAddress("0x45394189EB1aB713338Fc0693342042f137C6DCc"); -// } + } -// @Test -// public void testInvalidAddresses() { -// assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); -// assertInvalidAddress("N22FRU9f3fx7Hty641D5cg95kRK6S3sbf3"); -// assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); -// } -// } + @Test + public void testInvalidAddresses() { + assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); + assertInvalidAddress("N22FRU9f3fx7Hty641D5cg95kRK6S3sbf3"); + assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); + } +} From ede7e1ec2ceac2b57cf735b83b3e8b7925c6c664 Mon Sep 17 00:00:00 2001 From: DbixDev Date: Tue, 5 Nov 2019 14:29:19 +0100 Subject: [PATCH 6/7] removing files --- .../main/java/bisq/asset/coins/Dubaicoin.java | 28 ------------ .../META-INF/services/bisq.asset.Asset | 1 - .../java/bisq/asset/coins/DubaicoinTest.java | 44 ------------------- 3 files changed, 73 deletions(-) delete mode 100644 assets/src/main/java/bisq/asset/coins/Dubaicoin.java delete mode 100644 assets/src/test/java/bisq/asset/coins/DubaicoinTest.java diff --git a/assets/src/main/java/bisq/asset/coins/Dubaicoin.java b/assets/src/main/java/bisq/asset/coins/Dubaicoin.java deleted file mode 100644 index e323c97a552..00000000000 --- a/assets/src/main/java/bisq/asset/coins/Dubaicoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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.RegexAddressValidator; - -public class Dubaicoin extends Coin { - - public Dubaicoin() { - super("Dubaicoin", "DBIX", new RegexAddressValidator("^0x[0-9a-fA-F]{40}$")); - } -} \ No newline at end of file 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 c56bfc4e56a..5bcdee49d75 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -40,7 +40,6 @@ bisq.asset.coins.Doichain bisq.asset.coins.Donu bisq.asset.coins.Dragonglass bisq.asset.coins.DSTRA -bisq.asset.coins.Dubaicoin bisq.asset.coins.Emercoin bisq.asset.coins.Ergo bisq.asset.coins.Ether diff --git a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java deleted file mode 100644 index bf4575fe7af..00000000000 --- a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 DubaicoinTest extends AbstractAssetTest { - - public DubaicoinTest() { - super(new Dubaicoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0xb0fbfba46458d04d1a9c1ad4943477cd4a6d5379"); - assertValidAddress("0x66d434D922516177aD0B2F4623F5D876cA1b5A0b"); - assertValidAddress("0x45394189EB1aB713338Fc0693342042f137C6DCc"); - - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); - assertInvalidAddress("N22FRU9f3fx7Hty641D5cg95kRK6S3sbf3"); - assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); - } -} From ba17b6308cd9fb1299776b77e425c732ca50b2e0 Mon Sep 17 00:00:00 2001 From: DbixDev Date: Tue, 5 Nov 2019 14:31:06 +0100 Subject: [PATCH 7/7] List Dubaicoin (DBIX) --- .../main/java/bisq/asset/coins/Dubaicoin.java | 28 ++++++++++++ .../META-INF/services/bisq.asset.Asset | 1 + .../java/bisq/asset/coins/DubaicoinTest.java | 44 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 assets/src/main/java/bisq/asset/coins/Dubaicoin.java create mode 100644 assets/src/test/java/bisq/asset/coins/DubaicoinTest.java diff --git a/assets/src/main/java/bisq/asset/coins/Dubaicoin.java b/assets/src/main/java/bisq/asset/coins/Dubaicoin.java new file mode 100644 index 00000000000..e323c97a552 --- /dev/null +++ b/assets/src/main/java/bisq/asset/coins/Dubaicoin.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.RegexAddressValidator; + +public class Dubaicoin extends Coin { + + public Dubaicoin() { + super("Dubaicoin", "DBIX", new RegexAddressValidator("^0x[0-9a-fA-F]{40}$")); + } +} \ No newline at end of file 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 5bcdee49d75..c56bfc4e56a 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -40,6 +40,7 @@ bisq.asset.coins.Doichain bisq.asset.coins.Donu bisq.asset.coins.Dragonglass bisq.asset.coins.DSTRA +bisq.asset.coins.Dubaicoin bisq.asset.coins.Emercoin bisq.asset.coins.Ergo bisq.asset.coins.Ether diff --git a/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.java new file mode 100644 index 00000000000..bf4575fe7af --- /dev/null +++ b/assets/src/test/java/bisq/asset/coins/DubaicoinTest.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 DubaicoinTest extends AbstractAssetTest { + + public DubaicoinTest() { + super(new Dubaicoin()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("0xb0fbfba46458d04d1a9c1ad4943477cd4a6d5379"); + assertValidAddress("0x66d434D922516177aD0B2F4623F5D876cA1b5A0b"); + assertValidAddress("0x45394189EB1aB713338Fc0693342042f137C6DCc"); + + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); + assertInvalidAddress("N22FRU9f3fx7Hty641D5cg95kRK6S3sbf3"); + assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY"); + } +}