Helius
2020-10-13 c7de5883d504e6c636ac9c73113d782afbd3e66c
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -536,20 +536,20 @@
         // 如果是ROC  则自动转
         String transfer = RocService.transfer(amount, address, "ROC");
      }else if("USDT".equals(symbol) && !"Y".equals(selectById.getIsInside())){
         EthService ethService = new EthService();
         // 查询余额是否足够
         BigDecimal bigDecimal = ethService.tokenGetBalance(EthService.TOTAL_ADDRESS);
         if(bigDecimal==null ||bigDecimal.compareTo(amount)<0 ){
            FebsResponse fail = new FebsResponse().fail();
            fail.message("总钱包余额不足");
            return fail;
         }
         amount = amount.multiply(new BigDecimal("1000000"));
         String usdtStr = amount.toPlainString();
         if (usdtStr.contains(".")) {
            usdtStr = usdtStr.substring(0, usdtStr.lastIndexOf("."));
         }
         String s = ethService.tokenSend(address, usdtStr, null);
//         EthService ethService = new EthService();
//         // 查询余额是否足够
//         BigDecimal bigDecimal = ethService.tokenGetBalance(EthService.TOTAL_ADDRESS);
//         if(bigDecimal==null ||bigDecimal.compareTo(amount)<0 ){
//            FebsResponse fail = new FebsResponse().fail();
//            fail.message("总钱包余额不足");
//            return fail;
//         }
//         amount = amount.multiply(new BigDecimal("1000000"));
//         String usdtStr = amount.toPlainString();
//         if (usdtStr.contains(".")) {
//            usdtStr = usdtStr.substring(0, usdtStr.lastIndexOf("."));
//         }
//         String s = ethService.tokenSend(address, usdtStr, null);
      }
      /**