Compare commits

...

1 Commits

Author SHA1 Message Date
Flashfyre 2547ca173a Fix voucher compensation logic 2024-04-10 16:45:01 -04:00
1 changed files with 2 additions and 2 deletions

View File

@ -94,6 +94,8 @@ func handleSavedataUpdate(uuid []byte, slot int, save any) error {
if err != nil { if err != nil {
return fmt.Errorf("failed to write save file: %s", err) return fmt.Errorf("failed to write save file: %s", err)
} }
db.DeleteClaimedAccountCompensations(uuid)
case defs.SessionSaveData: // Session case defs.SessionSaveData: // Session
if slot < 0 || slot >= sessionSlotCount { if slot < 0 || slot >= sessionSlotCount {
return fmt.Errorf("slot id %d out of range", slot) return fmt.Errorf("slot id %d out of range", slot)
@ -126,8 +128,6 @@ func handleSavedataUpdate(uuid []byte, slot int, save any) error {
if err != nil { if err != nil {
return fmt.Errorf("failed to write save file: %s", err) return fmt.Errorf("failed to write save file: %s", err)
} }
db.DeleteClaimedAccountCompensations(uuid)
default: default:
return fmt.Errorf("invalid data type") return fmt.Errorf("invalid data type")
} }