Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

chore: fix the end time for gateways leaving #232

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/actions/write/evolveState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export const evolveState = async (
if (gateway.status === 'leaving') {
// fix the expiration to 21 days (was set at 90)
const currentEndFor90Days = gateway.end;
const correctEndFor21Days = currentEndFor90Days - 69 * BLOCKS_PER_DAY;
const correctEndFor21Days =
currentEndFor90Days - 69 * BLOCKS_PER_DAY + 4 * BLOCKS_PER_DAY; // add 4 days given the mistake
state.gateways[address].end = correctEndFor21Days;
state.gateways[address].vaults[address].end =
correctEndFor21Days + 4 * BLOCKS_PER_DAY; // add 4 days given the mistake
state.gateways[address].vaults[address].end = correctEndFor21Days;
}
}

Expand Down
Loading