Clean up compensation code

fasthttp
maru 2024-04-18 02:11:31 -04:00
parent 09abd1fb66
commit 35641e420b
No known key found for this signature in database
GPG Key ID: 37689350E9CD0F0D
1 changed files with 2 additions and 3 deletions

View File

@ -22,9 +22,8 @@ func Get(uuid []byte, datatype, slot int) (any, error) {
return nil, fmt.Errorf("failed to fetch compensations: %s", err)
}
for k, v := range compensations {
typeKey := strconv.Itoa(k)
system.VoucherCounts[typeKey] += v
for compensationType, amount := range compensations {
system.VoucherCounts[strconv.Itoa(compensationType)] += amount
}
return system, nil