grid2: ignore discounted trades

This commit is contained in:
c9s 2023-07-31 18:06:20 +08:00
parent f2109afa0e
commit 43b8e7870d
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -9,6 +9,10 @@ import (
func collectTradeFee(trades []types.Trade) map[string]fixedpoint.Value {
fees := make(map[string]fixedpoint.Value)
for _, t := range trades {
if t.FeeDiscounted {
continue
}
if fee, ok := fees[t.FeeCurrency]; ok {
fees[t.FeeCurrency] = fee.Add(t.Fee)
} else {