Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

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");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ haveno.asset.coins.Ether
haveno.asset.coins.Litecoin
haveno.asset.coins.Monero
haveno.asset.tokens.TetherUSDERC20
haveno.asset.tokens.TetherUSDTRC20
haveno.asset.tokens.TetherUSDTRC20
haveno.asset.tokens.USDCoinERC20
4 changes: 3 additions & 1 deletion core/src/main/java/haveno/core/locale/CurrencyUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public static List<CryptoCurrency> getMainCryptoCurrencies() {
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;
}
Expand Down Expand Up @@ -328,13 +329,14 @@ public static boolean isCryptoCurrency(String currencyCode) {
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;
}

Expand Down
Loading