fix: use match_address when locking exclusive wallets

LockTradeAddress queried bep_order with match_addr (wallet column),
causing Error 1054 and breaking exclusive address checks.
This commit is contained in:
long2ice
2026-07-14 01:11:03 +08:00
parent 43c579198a
commit efd1ce348a
+1 -1
View File
@@ -420,7 +420,7 @@ func LockTradeAddress(wallets []Wallet, t TradeType) (Wallet, string, error) {
status := []int{OrderStatusConfirming, OrderStatusWaiting}
for _, w := range wallets {
var o Order
Db.Where("match_addr = ? and status in (?) and trade_type = ? and address_locked = ?", w.GetMatchAddr(), status, t, true).Order("id desc").Limit(1).Find(&o)
Db.Where("match_address = ? and status in (?) and trade_type = ? and address_locked = ?", w.GetMatchAddr(), status, t, true).Order("id desc").Limit(1).Find(&o)
if o.ID == 0 {
return w, zero, nil
}