accept and support = XYZ
parent
bb8e7b3638
commit
1b44a4358d
|
|
@ -128,6 +128,20 @@ func (files Files) Deltas(like ...Like) (Deltas, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
balances := make(Balances)
|
||||||
|
for i := range result {
|
||||||
|
if result[i].isSet {
|
||||||
|
var was float64
|
||||||
|
if m, ok := balances[result[i].Name]; ok {
|
||||||
|
was = m[result[i].Currency]
|
||||||
|
}
|
||||||
|
result[i].Value = result[i].Value - was
|
||||||
|
result[i].isSet = false
|
||||||
|
}
|
||||||
|
balances.Push(result[i])
|
||||||
|
}
|
||||||
|
|
||||||
for i := range result {
|
for i := range result {
|
||||||
if result[i].isSet {
|
if result[i].isSet {
|
||||||
return nil, fmt.Errorf("failed to resolve isSet: %+v", result[i])
|
return nil, fmt.Errorf("failed to resolve isSet: %+v", result[i])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue