| | |
| | | // 如果是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); |
| | | } |
| | | |
| | | /** |