support Dogecoin (DOGE)

This commit is contained in:
woodser 2025-08-10 18:45:28 -04:00 committed by woodser
parent 878cbb86ce
commit 7bf9475585
6 changed files with 85 additions and 0 deletions

View 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 haveno.asset.coins;
import haveno.asset.Base58AddressValidator;
import haveno.asset.Coin;
import haveno.asset.NetworkParametersAdapter;
public class Dogecoin extends Coin {
public Dogecoin() {
super("Dogecoin", "DOGE", new Base58AddressValidator(new DogecoinMainNetParams()), Network.MAINNET);
}
public static class DogecoinMainNetParams extends NetworkParametersAdapter {
public DogecoinMainNetParams() {
this.addressHeader = 30;
this.p2shHeader = 22;
}
}
}

View file

@ -5,6 +5,7 @@
haveno.asset.coins.Bitcoin$Mainnet
haveno.asset.coins.BitcoinCash
haveno.asset.coins.Cardano
haveno.asset.coins.Dogecoin
haveno.asset.coins.Ether
haveno.asset.coins.Litecoin
haveno.asset.coins.Monero

View file

@ -0,0 +1,43 @@
/*
* 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 haveno.asset.coins;
import haveno.asset.AbstractAssetTest;
import org.junit.jupiter.api.Test;
public class DogecoinTest extends AbstractAssetTest {
public DogecoinTest() {
super(new Dogecoin());
}
@Test
public void testValidAddresses() {
assertValidAddress("DEa7damK8MsbdCJztidBasZKVsDLJifWfE");
assertValidAddress("DNkkfdUvkCDiywYE98MTVp9nQJTgeZAiFr");
assertValidAddress("DDWUYQ3GfMDj8hkx8cbnAMYkTzzAunAQxg");
}
@Test
public void testInvalidAddresses() {
assertInvalidAddress("1DDWUYQ3GfMDj8hkx8cbnAMYkTzzAunAQxg");
assertInvalidAddress("DDWUYQ3GfMDj8hkx8cbnAMYkTzzAunAQxgs");
assertInvalidAddress("DDWUYQ3GfMDj8hkx8cbnAMYkTzzAunAQxg#");
}
}

View file

@ -198,6 +198,7 @@ public class CurrencyUtil {
final List<CryptoCurrency> result = new ArrayList<>();
result.add(new CryptoCurrency("BTC", "Bitcoin"));
result.add(new CryptoCurrency("BCH", "Bitcoin Cash"));
result.add(new CryptoCurrency("DOGE", "Dogecoin"));
result.add(new CryptoCurrency("ETH", "Ether"));
result.add(new CryptoCurrency("LTC", "Litecoin"));
result.add(new CryptoCurrency("XRP", "Ripple"));

View file

@ -369,6 +369,10 @@
-fx-image: url("../../images/trx_logo.png");
}
#image-doge-logo {
-fx-image: url("../../images/doge_logo.png");
}
#image-dark-mode-toggle {
-fx-image: url("../../images/dark_mode_toggle.png");
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB