Skip to content

Commit 6a138fd

Browse files
abarmatdavekay100
authored andcommitted
staking: different revert message according to auth reason
1 parent 271cb46 commit 6a138fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contracts/staking/Staking.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ contract Staking is StakingV1Storage, GraphUpgradeable, IStaking {
814814
AllocationState allocState = _getAllocationState(_allocationID);
815815

816816
// Validate ownership
817-
require(_onlyAuthOrDelegator(alloc.indexer), "!auth");
817+
require(_onlyAuthOrDelegator(alloc.indexer), "!auth-or-del");
818818

819819
// TODO: restake when delegator called should not be allowed?
820820

@@ -1003,7 +1003,7 @@ contract Staking is StakingV1Storage, GraphUpgradeable, IStaking {
10031003
// Validate ownership
10041004
if (epochs > maxAllocationEpochs) {
10051005
// Verify that the allocation owner or delegator is closing
1006-
require(_onlyAuthOrDelegator(alloc.indexer), "!auth");
1006+
require(_onlyAuthOrDelegator(alloc.indexer), "!auth-or-del");
10071007
} else {
10081008
// Verify that the allocation owner is closing
10091009
require(_onlyAuth(alloc.indexer), "!auth");

0 commit comments

Comments
 (0)