Helius
2022-08-12 5e0c0bacadab898152518437ceb63bf8b54c6652
src/main/java/cc/mrbird/febs/dapp/service/impl/BscCoinContractEvent.java
@@ -138,7 +138,7 @@
                    boolean hasFlow = false;
                    for (DappFundFlowEntity flow : flows) {
                        if (flow.getStatus() == 1) {
                            if (amount.compareTo(flow.getTargetAmount()) == 0) {
                            if (amount.compareTo(flow.getAmount()) == 0) {
                                hasFlow = true;
                                fundFlow = flow;
                                fundFlow.setFromHash(e.log.getTransactionHash());
@@ -154,6 +154,10 @@
                }
                OnlineTransferUtil.addTransferRecord(e.from, e.to, amount, e.log.getTransactionHash(), DappTransferRecordEntity.TRANSFER_SOURCE_FLAG_APPLICATION, AppContants.SYMBOL_COIN);
                if (fundFlow.getAmount().add(fundFlow.getFee()).compareTo(amount) != 0) {
                    return;
                }
                BigDecimal newPrice = fundFlow.getNewestPrice();
                BigDecimal transferAmount = amount.multiply(newPrice);