|
|
@@ -206,14 +206,20 @@ public class EthMevController extends Controller {
|
|
|
|
|
|
if (tokenObj != null) {
|
|
|
JSONObject tokenObjDataObj = JSONObject.parseObject(tokenObj.getStr("data"));
|
|
|
- tradeInfo.put("tokenSymbol", tokenObjDataObj.getString("symbol"));
|
|
|
|
|
|
- BigDecimal amount = tradeInfo.getBigDecimal("amount");
|
|
|
- BigDecimal ten = new BigDecimal("10");
|
|
|
- int decimals = tokenObjDataObj.getInteger("decimals");
|
|
|
+ if (tokenObjDataObj.getString("LP") == null) {
|
|
|
+ tradeInfo.put("tokenSymbol", tokenObjDataObj.getString("symbol"));
|
|
|
|
|
|
- BigDecimal realAmount = amount.divide(ten.pow(decimals));
|
|
|
- tradeInfo.put("amount", realAmount.doubleValue());
|
|
|
+ BigDecimal amount = tradeInfo.getBigDecimal("amount");
|
|
|
+ BigDecimal ten = new BigDecimal("10");
|
|
|
+ int decimals = tokenObjDataObj.getInteger("decimals");
|
|
|
+
|
|
|
+ BigDecimal realAmount = amount.divide(ten.pow(decimals));
|
|
|
+ tradeInfo.put("amount", realAmount.doubleValue());
|
|
|
+ } else {
|
|
|
+ tradeInfo.put("tokenSymbol", tokenObjDataObj.getString("name"));
|
|
|
+ tradeInfo.put("amount", 1);
|
|
|
+ }
|
|
|
} else if (tradeInfo.getString("token").equals("0xeth")) {
|
|
|
tradeInfo.put("tokenSymbol", "Ethereum");
|
|
|
|