From ba7ab22d4dde81b3f9af2169520bb1286c97b9b4 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 11 Apr 2024 10:01:26 -0400 Subject: [PATCH] Fix voucher compensation logic --- api/savedata.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/savedata.go b/api/savedata.go index 79f8753..7896af4 100644 --- a/api/savedata.go +++ b/api/savedata.go @@ -94,6 +94,8 @@ func handleSavedataUpdate(uuid []byte, slot int, save any) error { if err != nil { return fmt.Errorf("failed to serialize save: %s", err) } + + db.DeleteClaimedAccountCompensations(uuid) case defs.SessionSaveData: // Session if slot < 0 || slot >= sessionSlotCount { return fmt.Errorf("slot id %d out of range", slot) @@ -127,8 +129,6 @@ func handleSavedataUpdate(uuid []byte, slot int, save any) error { if err != nil { return fmt.Errorf("failed to serialize save: %s", err) } - - db.DeleteClaimedAccountCompensations(uuid) default: return fmt.Errorf("invalid data type") }