use of wannabit.io.cosmostaion.dao.IbcToken in project cosmostation-android by cosmostation.
the class WUtil method dpCosmosTokenName.
public static String dpCosmosTokenName(Context c, BaseData baseData, TextView textView, String denom) {
if (denom.equals(TOKEN_ATOM)) {
textView.setTextColor(c.getResources().getColor(R.color.colorAtom));
textView.setText("ATOM");
} else if (denom.startsWith("pool")) {
textView.setTextColor(c.getResources().getColor(R.color.colorWhite));
Liquidity.Pool poolInfo = baseData.getGravityPoolByDenom(denom);
if (poolInfo != null) {
textView.setText("GDEX-" + poolInfo.getId());
} else {
textView.setText("UnKnown");
}
} else if (denom.startsWith("ibc/")) {
textView.setTextColor(c.getResources().getColor(R.color.colorWhite));
IbcToken ibcToken = baseData.getIbcToken(denom.replaceAll("ibc/", ""));
if (ibcToken != null && ibcToken.auth) {
if (ibcToken.base_denom.startsWith("cw20:")) {
String cAddress = ibcToken.base_denom.replaceAll("cw20:", "");
for (Cw20Assets assets : baseData.mCw20Assets) {
if (assets.contract_address.equalsIgnoreCase(cAddress)) {
textView.setText(assets.denom.toUpperCase());
}
}
} else {
textView.setText(ibcToken.display_denom.toUpperCase());
}
} else {
textView.setText("UnKnown");
}
} else {
textView.setTextColor(c.getResources().getColor(R.color.colorWhite));
textView.setText("UnKnown");
}
return denom;
}
use of wannabit.io.cosmostaion.dao.IbcToken in project cosmostation-android by cosmostation.
the class WUtil method dpSifTokenName.
public static String dpSifTokenName(Context c, BaseData baseData, TextView textView, String denom) {
if (denom != null) {
if (denom.equals(TOKEN_SIF)) {
textView.setTextColor(c.getResources().getColor(R.color.colorSif));
textView.setText("ROWAN");
} else if (denom.startsWith("c")) {
textView.setTextColor(c.getResources().getColor(R.color.colorWhite));
textView.setText(denom.substring(1).toUpperCase());
} else if (denom.startsWith("ibc/")) {
textView.setTextColor(c.getResources().getColor(R.color.colorWhite));
IbcToken ibcToken = baseData.getIbcToken(denom.replaceAll("ibc/", ""));
if (ibcToken != null && ibcToken.auth) {
if (ibcToken.base_denom.startsWith("cw20:")) {
String cAddress = ibcToken.base_denom.replaceAll("cw20:", "");
for (Cw20Assets assets : baseData.mCw20Assets) {
if (assets.contract_address.equalsIgnoreCase(cAddress)) {
textView.setText(assets.denom.toUpperCase());
}
}
} else {
textView.setText(ibcToken.display_denom.toUpperCase());
}
} else {
textView.setText("UnKnown");
}
} else {
textView.setTextColor(c.getResources().getColor(R.color.colorWhite));
textView.setText("UnKnown");
}
}
return denom;
}
use of wannabit.io.cosmostaion.dao.IbcToken in project cosmostation-android by cosmostation.
the class WUtil method DpCosmosTokenImg.
/**
* Token Img
*/
public static void DpCosmosTokenImg(BaseData baseData, ImageView imageView, String denom) {
if (denom.equalsIgnoreCase(TOKEN_ATOM)) {
Picasso.get().cancelRequest(imageView);
imageView.setImageResource(R.drawable.atom_ic);
} else if (denom.startsWith("pool")) {
Liquidity.Pool poolInfo = baseData.getGravityPoolByDenom(denom);
if (poolInfo != null) {
imageView.setImageResource(R.drawable.token_gravitydex);
}
} else if (denom.startsWith("ibc/")) {
IbcToken ibcToken = baseData.getIbcToken(denom.replaceAll("ibc/", ""));
try {
Picasso.get().load(ibcToken.moniker).fit().placeholder(R.drawable.token_default_ibc).error(R.drawable.token_default_ibc).into(imageView);
} catch (Exception e) {
}
}
}
use of wannabit.io.cosmostaion.dao.IbcToken in project cosmostation-android by cosmostation.
the class WDp method allAssetToUserCurrency.
public static BigDecimal allAssetToUserCurrency(BaseChain baseChain, BaseData baseData) {
BigDecimal totalValue = BigDecimal.ZERO;
if (isGRPC(baseChain)) {
for (Coin coin : baseData.mGrpcBalance) {
if (coin.denom.equals(mainDenom(baseChain))) {
BigDecimal amount = baseData.getAllMainAsset(mainDenom(baseChain));
BigDecimal assetValue = userCurrencyValue(baseData, coin.denom, amount, mainDivideDecimal(baseChain));
totalValue = totalValue.add(assetValue);
} else if (baseChain.equals(COSMOS_MAIN) && coin.denom.startsWith("pool")) {
BigDecimal amount = baseData.getAvailable(coin.denom);
BigDecimal assetValue = userCurrencyValue(baseData, coin.denom, amount, 6);
totalValue = totalValue.add(assetValue);
} else if (baseChain.equals(OSMOSIS_MAIN) && coin.denom.equals(TOKEN_ION) || baseChain.equals(CRESCENT_MAIN) && coin.denom.equals(TOKEN_BCRE) || baseChain.equals(NYX_MAIN) && coin.denom.equals(TOKEN_NYM)) {
BigDecimal amount = baseData.getAvailable(coin.denom);
BigDecimal assetValue = userCurrencyValue(baseData, coin.denom, amount, 6);
totalValue = totalValue.add(assetValue);
} else if (baseChain.equals(OSMOSIS_MAIN) && coin.denom.contains("gamm/pool")) {
BigDecimal amount = baseData.getAvailable(coin.denom);
BigDecimal assetValue = userCurrencyValue(baseData, coin.denom, amount, 18);
totalValue = totalValue.add(assetValue);
} else if (baseChain.equals(SIF_MAIN) && coin.denom.startsWith("c")) {
BigDecimal amount = baseData.getAvailable(coin.denom);
int decimal = WUtil.getSifCoinDecimal(baseData, coin.denom);
BigDecimal assetValue = userCurrencyValue(baseData, coin.denom.substring(1), amount, decimal);
totalValue = totalValue.add(assetValue);
} else if (baseChain.equals(EMONEY_MAIN) || coin.denom.startsWith("e")) {
BigDecimal available = baseData.getAvailable(coin.denom);
totalValue = totalValue.add(userCurrencyValue(baseData, coin.denom, available, 6));
} else if (baseChain.equals(KAVA_MAIN) && !coin.isIbc()) {
BigDecimal amount = baseData.getAvailable(coin.denom);
amount = amount.add(baseData.getVesting(coin.denom));
String kavaDenom = WDp.getKavaBaseDenom(coin.denom);
int kavaDecimal = WUtil.getKavaCoinDecimal(baseData, coin.denom);
BigDecimal assetValue = userCurrencyValue(baseData, kavaDenom, amount, kavaDecimal);
totalValue = totalValue.add(assetValue);
} else if (baseChain.equals(GRABRIDGE_MAIN) && coin.denom.startsWith("gravity")) {
Assets assets = baseData.getAsset(coin.denom);
BigDecimal available = baseData.getAvailable(assets.denom);
totalValue = totalValue.add(userCurrencyValue(baseData, assets.origin_symbol, available, assets.decimal));
} else if (baseChain.equals(INJ_MAIN) && coin.denom.startsWith("peggy")) {
Assets assets = baseData.getAsset(coin.denom);
BigDecimal available = baseData.getAvailable(assets.denom);
totalValue = totalValue.add(userCurrencyValue(baseData, assets.origin_symbol, available, assets.decimal));
} else if (coin.isIbc()) {
BigDecimal amount = baseData.getAvailable(coin.denom);
IbcToken ibcToken = baseData.getIbcToken(coin.denom);
if (ibcToken != null && ibcToken.auth) {
BigDecimal assetValue = userCurrencyValue(baseData, ibcToken.base_denom, amount, ibcToken.decimal);
totalValue = totalValue.add(assetValue);
}
}
}
if (baseData.getCw20sGrpc(baseChain).size() > 0) {
for (Cw20Assets assets : baseData.getCw20sGrpc(baseChain)) {
BigDecimal amount = assets.getAmount();
totalValue = totalValue.add(userCurrencyValue(baseData, assets.denom, amount, assets.decimal));
}
}
} else if (baseChain.equals(BNB_MAIN)) {
for (Balance balance : baseData.mBalances) {
if (balance.symbol.equals(mainDenom(baseChain))) {
BigDecimal amount = baseData.getAllBnbTokenAmount(balance.symbol);
BigDecimal assetValue = userCurrencyValue(baseData, TOKEN_BNB, amount, mainDivideDecimal(baseChain));
totalValue = totalValue.add(assetValue);
} else {
BigDecimal amount = baseData.getAllBnbTokenAmount(balance.symbol);
BigDecimal convertAmount = WUtil.getBnbConvertAmount(baseData, balance.symbol, amount);
BigDecimal assetValue = userCurrencyValue(baseData, TOKEN_BNB, convertAmount, mainDivideDecimal(baseChain));
totalValue = totalValue.add(assetValue);
}
}
} else if (baseChain.equals(OKEX_MAIN)) {
for (Balance balance : baseData.mBalances) {
if (balance.symbol.equals(mainDenom(baseChain))) {
BigDecimal amount = baseData.getAllExToken(balance.symbol);
BigDecimal assetValue = userCurrencyValue(baseData, TOKEN_OK, amount, mainDivideDecimal(baseChain));
totalValue = totalValue.add(assetValue);
} else {
BigDecimal convertAmount = convertTokenToOkt(baseData, balance.symbol);
BigDecimal assetValue = userCurrencyValue(baseData, TOKEN_OK, convertAmount, mainDivideDecimal(baseChain));
totalValue = totalValue.add(assetValue);
}
}
} else {
for (Balance balance : baseData.mBalances) {
if (balance.symbol.equals(mainDenom(baseChain))) {
BigDecimal amount = baseData.getAllMainAssetOld(balance.symbol);
BigDecimal assetValue = userCurrencyValue(baseData, balance.symbol, amount, mainDivideDecimal(baseChain));
totalValue = totalValue.add(assetValue);
} else {
}
}
}
return totalValue;
}
use of wannabit.io.cosmostaion.dao.IbcToken in project cosmostation-android by cosmostation.
the class WDp method showCoinDp.
public static void showCoinDp(Context c, BaseData baseData, String symbol, String amount, TextView denomTv, TextView amountTv, BaseChain chain) {
if (isGRPC(chain) && symbol.startsWith("ibc")) {
IbcToken ibcToken = baseData.getIbcToken(symbol.replaceAll("ibc/", ""));
if (ibcToken != null && ibcToken.auth) {
denomTv.setText(ibcToken.display_denom.toUpperCase());
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), ibcToken.decimal, ibcToken.decimal));
} else {
denomTv.setText("Unknown");
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
}
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
} else if (chain.equals(COSMOS_MAIN)) {
if (symbol.equals(TOKEN_ATOM)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
denomTv.setText(symbol.toUpperCase());
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(IRIS_MAIN)) {
if (symbol.equals(TOKEN_IRIS)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
denomTv.setText(symbol.toUpperCase());
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(KAVA_MAIN)) {
if (symbol.equals(TOKEN_KAVA)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else if (symbol.equals(TOKEN_HARD)) {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorHard));
} else if (symbol.equals(TOKEN_USDX)) {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorUsdx));
} else if (symbol.equals(TOKEN_SWP)) {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorSwp));
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
if (amountTv != null)
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), WUtil.getKavaCoinDecimal(baseData, symbol), WUtil.getKavaCoinDecimal(baseData, symbol)));
} else if (chain.equals(IOV_MAIN)) {
if (symbol.equals(TOKEN_IOV)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
denomTv.setText(symbol.toUpperCase());
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(BNB_MAIN)) {
if (symbol.equals(TOKEN_BNB)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 0, 8));
} else if (chain.equals(BAND_MAIN)) {
DpMainDenom(c, chain.getChain(), denomTv);
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(OKEX_MAIN)) {
if (symbol.equals(TOKEN_OK)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 0, 18));
} else if (chain.equals(CERTIK_MAIN)) {
if (symbol.equals(TOKEN_CERTIK)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(SECRET_MAIN)) {
if (symbol.equals(TOKEN_SECRET)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(AKASH_MAIN)) {
if (symbol.equals(TOKEN_AKASH)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(PERSIS_MAIN)) {
if (symbol.equals(TOKEN_XPRT)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(SENTINEL_MAIN)) {
if (symbol.equals(TOKEN_DVPN)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(FETCHAI_MAIN)) {
if (symbol.equals(TOKEN_FET)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 18, 18));
} else if (chain.equals(CRYPTO_MAIN)) {
if (symbol.equals(TOKEN_CRO)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 8, 8));
} else if (chain.equals(SIF_MAIN)) {
int decimal = WUtil.getSifCoinDecimal(symbol);
if (symbol.equals(TOKEN_SIF)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else if (symbol.startsWith("c")) {
denomTv.setText(symbol.substring(1).toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), decimal, decimal));
} else if (chain.equals(KI_MAIN)) {
if (symbol.equals(TOKEN_KI)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(OSMOSIS_MAIN)) {
if (symbol.equals(TOKEN_OSMOSIS)) {
DpMainDenom(c, chain.getChain(), denomTv);
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (symbol.equals(TOKEN_ION)) {
denomTv.setText("ION");
denomTv.setTextColor(c.getResources().getColor(R.color.colorIon));
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (symbol.startsWith("gamm/pool/")) {
String[] value = symbol.split("/");
denomTv.setText("GAMM-" + value[value.length - 1]);
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 18, 18));
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
}
} else if (chain.equals(MEDI_MAIN)) {
if (symbol.equals(TOKEN_MEDI)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(EMONEY_MAIN)) {
if (symbol.equalsIgnoreCase(TOKEN_NGM)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(RIZON_MAIN)) {
if (symbol.equals(TOKEN_RIZON)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(JUNO_MAIN)) {
if (symbol.equals(TOKEN_JUNO)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(REGEN_MAIN)) {
if (symbol.equals(TOKEN_REGEN)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(BITCANNA_MAIN)) {
if (symbol.equals(TOKEN_BITCANNA)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(ALTHEA_MAIN)) {
if (symbol.equals(TOKEN_ALTHEA)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(STARGAZE_MAIN)) {
if (symbol.equals(TOKEN_STARGAZE)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(GRABRIDGE_MAIN)) {
int decimal = WUtil.getGBridgeCoinDecimal(baseData, symbol);
if (symbol.equals(TOKEN_GRABRIDGE)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else if (symbol.startsWith("gravity")) {
final Assets assets = baseData.getAsset(symbol);
if (assets != null) {
denomTv.setText(assets.origin_symbol);
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), decimal, decimal));
} else if (chain.equals(COMDEX_MAIN)) {
if (symbol.equals(TOKEN_COMDEX)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(INJ_MAIN)) {
if (symbol.equals(TOKEN_INJ)) {
DpMainDenom(c, chain.getChain(), denomTv);
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 18, 18));
} else if (symbol.startsWith("peggy")) {
final Assets assets = baseData.getAsset(symbol);
if (assets != null) {
denomTv.setText(assets.origin_symbol);
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), assets.decimal, assets.decimal));
}
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 18, 18));
}
} else if (chain.equals(BITSONG_MAIN)) {
if (symbol.equals(TOKEN_BITSONG)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(DESMOS_MAIN)) {
if (symbol.equals(TOKEN_DESMOS)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(LUM_MAIN)) {
if (symbol.equals(TOKEN_LUM)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(CHIHUAHUA_MAIN)) {
if (symbol.equals(TOKEN_CHIHUAHUA)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(AXELAR_MAIN)) {
if (symbol.equals(TOKEN_AXELAR)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(KONSTELL_MAIN)) {
if (symbol.equals(TOKEN_DARC)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(UMEE_MAIN)) {
if (symbol.equals(TOKEN_UMEE)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(EVMOS_MAIN)) {
if (symbol.equals(TOKEN_EVMOS)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 18, 18));
} else if (chain.equals(CUDOS_MAIN)) {
if (symbol.equals(TOKEN_CUDOS)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 18, 18));
} else if (chain.equals(PROVENANCE_MAIN)) {
if (symbol.equals(TOKEN_HASH)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 9, 9));
} else if (chain.equals(CERBERUS_MAIN)) {
if (symbol.equals(TOKEN_CRBRUS)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(OMNIFLIX_MAIN)) {
if (symbol.equals(TOKEN_FLIX)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(CRESCENT_MAIN)) {
if (symbol.equals(TOKEN_CRE)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else if (symbol.equals(TOKEN_BCRE)) {
denomTv.setText(R.string.str_bcre_c);
denomTv.setTextColor(c.getResources().getColor(R.color.colorCrescent2));
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(ASSETMANTLE_MAIN)) {
if (symbol.equals(TOKEN_MANTLE)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(NYX_MAIN)) {
if (symbol.equals(TOKEN_NYX)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else if (symbol.equals(TOKEN_NYM)) {
denomTv.setText(R.string.str_nym_c);
denomTv.setTextColor(c.getResources().getColor(R.color.colorNym));
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(STATION_TEST)) {
if (symbol.equals(TOKEN_STATION)) {
DpMainDenom(c, chain.getChain(), denomTv);
}
} else if (chain.equals(COSMOS_TEST)) {
if (symbol.equals(TOKEN_COSMOS_TEST)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(IRIS_TEST)) {
if (symbol.equals(TOKEN_IRIS_TEST)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
} else if (chain.equals(CRESCENT_TEST)) {
if (symbol.equals(TOKEN_CRESCENT_TEST)) {
DpMainDenom(c, chain.getChain(), denomTv);
} else {
denomTv.setText(symbol.toUpperCase());
denomTv.setTextColor(c.getResources().getColor(R.color.colorWhite));
}
amountTv.setText(getDpAmount2(c, new BigDecimal(amount), 6, 6));
}
}
Aggregations