From ddab1702104493655c25758282757e10cb3d76f6 Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 28 May 2025 08:56:34 -0400 Subject: [PATCH] remove currency codes from crypto names --- .../main/java/haveno/asset/tokens/TetherUSDERC20.java | 2 +- .../main/java/haveno/asset/tokens/TetherUSDTRC20.java | 2 +- .../main/java/haveno/asset/tokens/USDCoinERC20.java | 2 +- .../main/java/haveno/core/locale/CryptoCurrency.java | 2 +- .../src/main/java/haveno/core/locale/CurrencyUtil.java | 10 +++++----- .../java/haveno/core/locale/TraditionalCurrency.java | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/assets/src/main/java/haveno/asset/tokens/TetherUSDERC20.java b/assets/src/main/java/haveno/asset/tokens/TetherUSDERC20.java index 1afb7ff1f2..ffbcac2cd3 100644 --- a/assets/src/main/java/haveno/asset/tokens/TetherUSDERC20.java +++ b/assets/src/main/java/haveno/asset/tokens/TetherUSDERC20.java @@ -6,6 +6,6 @@ public class TetherUSDERC20 extends Erc20Token { public TetherUSDERC20() { // If you add a new USDT variant or want to change this ticker symbol you should also look here: // core/src/main/java/haveno/core/provider/price/PriceProvider.java:getAll() - super("Tether USD (ERC20)", "USDT-ERC20"); + super("Tether USD", "USDT-ERC20"); } } diff --git a/assets/src/main/java/haveno/asset/tokens/TetherUSDTRC20.java b/assets/src/main/java/haveno/asset/tokens/TetherUSDTRC20.java index c5669d126a..c12bb37442 100644 --- a/assets/src/main/java/haveno/asset/tokens/TetherUSDTRC20.java +++ b/assets/src/main/java/haveno/asset/tokens/TetherUSDTRC20.java @@ -6,6 +6,6 @@ public class TetherUSDTRC20 extends Trc20Token { public TetherUSDTRC20() { // If you add a new USDT variant or want to change this ticker symbol you should also look here: // core/src/main/java/haveno/core/provider/price/PriceProvider.java:getAll() - super("Tether USD (TRC20)", "USDT-TRC20"); + super("Tether USD", "USDT-TRC20"); } } diff --git a/assets/src/main/java/haveno/asset/tokens/USDCoinERC20.java b/assets/src/main/java/haveno/asset/tokens/USDCoinERC20.java index a65c021df9..cb371bd221 100644 --- a/assets/src/main/java/haveno/asset/tokens/USDCoinERC20.java +++ b/assets/src/main/java/haveno/asset/tokens/USDCoinERC20.java @@ -22,6 +22,6 @@ import haveno.asset.Erc20Token; public class USDCoinERC20 extends Erc20Token { public USDCoinERC20() { - super("USD Coin (ERC20)", "USDC-ERC20"); + super("USD Coin", "USDC-ERC20"); } } diff --git a/core/src/main/java/haveno/core/locale/CryptoCurrency.java b/core/src/main/java/haveno/core/locale/CryptoCurrency.java index 6c46c9d2b3..feabaf1943 100644 --- a/core/src/main/java/haveno/core/locale/CryptoCurrency.java +++ b/core/src/main/java/haveno/core/locale/CryptoCurrency.java @@ -54,7 +54,7 @@ public final class CryptoCurrency extends TradeCurrency { public static CryptoCurrency fromProto(protobuf.TradeCurrency proto) { return new CryptoCurrency(proto.getCode(), - proto.getName(), + CurrencyUtil.getNameByCode(proto.getCode()), proto.getCryptoCurrency().getIsAsset()); } diff --git a/core/src/main/java/haveno/core/locale/CurrencyUtil.java b/core/src/main/java/haveno/core/locale/CurrencyUtil.java index 6ed42b6234..911bb65d96 100644 --- a/core/src/main/java/haveno/core/locale/CurrencyUtil.java +++ b/core/src/main/java/haveno/core/locale/CurrencyUtil.java @@ -66,7 +66,7 @@ import static java.lang.String.format; @Slf4j public class CurrencyUtil { public static void setup() { - setBaseCurrencyCode("XMR"); + setBaseCurrencyCode(baseCurrencyCode); } private static final AssetRegistry assetRegistry = new AssetRegistry(); @@ -200,10 +200,10 @@ public class CurrencyUtil { result.add(new CryptoCurrency("BCH", "Bitcoin Cash")); result.add(new CryptoCurrency("ETH", "Ether")); result.add(new CryptoCurrency("LTC", "Litecoin")); - result.add(new CryptoCurrency("DAI-ERC20", "Dai Stablecoin (ERC20)")); - result.add(new CryptoCurrency("USDT-ERC20", "Tether USD (ERC20)")); - result.add(new CryptoCurrency("USDT-TRC20", "Tether USD (TRC20)")); - result.add(new CryptoCurrency("USDC-ERC20", "USD Coin (ERC20)")); + result.add(new CryptoCurrency("DAI-ERC20", "Dai Stablecoin")); + result.add(new CryptoCurrency("USDT-ERC20", "Tether USD")); + result.add(new CryptoCurrency("USDT-TRC20", "Tether USD")); + result.add(new CryptoCurrency("USDC-ERC20", "USD Coin")); result.sort(TradeCurrency::compareTo); return result; } diff --git a/core/src/main/java/haveno/core/locale/TraditionalCurrency.java b/core/src/main/java/haveno/core/locale/TraditionalCurrency.java index 1ab491467e..cc42342abb 100644 --- a/core/src/main/java/haveno/core/locale/TraditionalCurrency.java +++ b/core/src/main/java/haveno/core/locale/TraditionalCurrency.java @@ -86,7 +86,7 @@ public final class TraditionalCurrency extends TradeCurrency { } public static TraditionalCurrency fromProto(protobuf.TradeCurrency proto) { - return new TraditionalCurrency(proto.getCode(), proto.getName()); + return new TraditionalCurrency(proto.getCode(), CurrencyUtil.getNameByCode(proto.getCode())); }