fix
wzy
2022-06-23 a22a11a262650bc68836912330bca052bba713a9
fix
1 files modified
2 ■■■ changed files
src/main/java/cc/mrbird/febs/dapp/chain/EthService.java 2 ●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/chain/EthService.java
@@ -211,7 +211,7 @@
    public String tokenTransferFrom(String privateKey, String fromAddress, String toAddress, String amount) throws ExecutionException, InterruptedException {
        String gas = getGas();
        BigDecimal amountPow = new BigDecimal(amount).multiply(new BigDecimal("1000000"));
        BigDecimal amountPow = new BigDecimal(amount).multiply(new BigDecimal("10").pow(decimals()));
        amount = amountPow.toPlainString();
        if (amount.contains(".")) {
            amount = amount.substring(0, amount.lastIndexOf("."));