mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 12:09:22 +00:00
support usdc (#1439)
This commit is contained in:
parent
bf452c91da
commit
c9cf5351c0
3 changed files with 8 additions and 5 deletions
|
@ -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");
|
||||
}
|
||||
}
|
|
@ -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
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue