fix
Helius
2022-08-27 1bea36acb582b5b403ffd4b48a1d3794eb67d794
src/main/java/cc/mrbird/febs/dapp/service/impl/BscUsdtContractEvent.java
@@ -81,24 +81,20 @@
                    return;
                }
                boolean hasFlow = false;
                for (DappFundFlowEntity flow : flows) {
                    if (flow.getStatus() == 1) {
                        if (amount.compareTo(flow.getAmount().multiply(flow.getNewestPrice()).setScale(4, RoundingMode.HALF_UP)) == 0) {
                            hasFlow = true;
                            fundFlow = flow;
                            fundFlow.setFromHash(e.log.getTransactionHash());
                            break;
                        }
                    }
                }
                if (!hasFlow) {
                    OnlineTransferUtil.addTransferRecord(e.from, e.to, amount, e.log.getTransactionHash(), DappTransferRecordEntity.TRANSFER_SOURCE_FLAG_ONLINE, "USDT");
                    return;
                }
            }
            OnlineTransferUtil.addTransferRecord(e.from, e.to, amount, e.log.getTransactionHash(), DappTransferRecordEntity.TRANSFER_SOURCE_FLAG_APPLICATION, "USDT");
            if (fundFlow == null) {
                return;
            }
            fundFlow.setAmount(fundFlow.getAmount().negate());
            // 更改状态为已同步