Skip to content

Commit

Permalink
fix: restore migrate function to require from if revert.
Browse files Browse the repository at this point in the history
Co-authored-by: Tomás Migone <[email protected]>
  • Loading branch information
MoonBoi9001 and tmigone authored Sep 20, 2024
1 parent b6d99f1 commit 3a79539
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ library LegacyAllocation {
address allocationId,
bytes32 subgraphDeploymentId
) internal {
if (self[allocationId].exists()) {
revert LegacyAllocationAlreadyMigrated(allocationId);
}
require(!self[allocationId].exists(), LegacyAllocationAlreadyMigrated(allocationId);

State memory allocation = State({ indexer: indexer, subgraphDeploymentId: subgraphDeploymentId });
self[allocationId] = allocation;
Expand Down

0 comments on commit 3a79539

Please sign in to comment.