diff --git a/assets/src/main/java/haveno/asset/tokens/USDCoin.java b/assets/src/main/java/haveno/asset/tokens/USDCoinERC20.java similarity index 85% rename from assets/src/main/java/haveno/asset/tokens/USDCoin.java rename to assets/src/main/java/haveno/asset/tokens/USDCoinERC20.java index b3e5c121e5..a65c021df9 100644 --- a/assets/src/main/java/haveno/asset/tokens/USDCoin.java +++ b/assets/src/main/java/haveno/asset/tokens/USDCoinERC20.java @@ -19,9 +19,9 @@ package haveno.asset.tokens; import haveno.asset.Erc20Token; -public class USDCoin extends Erc20Token { +public class USDCoinERC20 extends Erc20Token { - public USDCoin() { - super("USD Coin", "USDC"); + public USDCoinERC20() { + super("USD Coin (ERC20)", "USDC-ERC20"); } } diff --git a/assets/src/main/resources/META-INF/services/haveno.asset.Asset b/assets/src/main/resources/META-INF/services/haveno.asset.Asset index 350f6f1501..709b951227 100644 --- a/assets/src/main/resources/META-INF/services/haveno.asset.Asset +++ b/assets/src/main/resources/META-INF/services/haveno.asset.Asset @@ -8,4 +8,5 @@ haveno.asset.coins.Ether haveno.asset.coins.Litecoin haveno.asset.coins.Monero haveno.asset.tokens.TetherUSDERC20 -haveno.asset.tokens.TetherUSDTRC20 \ No newline at end of file +haveno.asset.tokens.TetherUSDTRC20 +haveno.asset.tokens.USDCoinERC20 \ No newline at end of file diff --git a/core/src/main/java/haveno/core/locale/CurrencyUtil.java b/core/src/main/java/haveno/core/locale/CurrencyUtil.java index 93f579f413..bd66667da5 100644 --- a/core/src/main/java/haveno/core/locale/CurrencyUtil.java +++ b/core/src/main/java/haveno/core/locale/CurrencyUtil.java @@ -201,6 +201,7 @@ public class CurrencyUtil { result.add(new CryptoCurrency("ETH", "Ether")); result.add(new CryptoCurrency("LTC", "Litecoin")); result.add(new CryptoCurrency("USDT-ERC20", "Tether USD (ERC20)")); + result.add(new CryptoCurrency("USDC-ERC20", "USD Coin (ERC20)")); result.sort(TradeCurrency::compareTo); return result; } @@ -328,13 +329,14 @@ public class CurrencyUtil { private static boolean isCryptoCurrencyBase(String currencyCode) { if (currencyCode == null) return false; currencyCode = currencyCode.toUpperCase(); - return currencyCode.equals("USDT"); + return currencyCode.equals("USDT") || currencyCode.equals("USDC"); } public static String getCurrencyCodeBase(String currencyCode) { if (currencyCode == null) return null; currencyCode = currencyCode.toUpperCase(); if (currencyCode.contains("USDT")) return "USDT"; + if (currencyCode.contains("USDC")) return "USDC"; return currencyCode; }