Skip to content

Commit

Permalink
fix: protect against -1 serviceId related errors
Browse files Browse the repository at this point in the history
  • Loading branch information
truemiller committed Sep 3, 2024
1 parent 664b3cb commit 9d22c47
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/service/Autonolas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,7 @@ const getServiceRegistryInfo = async (
const getCurrentStakingProgramByServiceId = async (
serviceId: number,
): Promise<StakingProgram | null> => {

if (serviceId < 1) return null;
if (serviceId <= -1) return null;

const contractCalls = Object.values(StakingProgram).reduce(
(acc, stakingProgram: StakingProgram) => ({
Expand Down

0 comments on commit 9d22c47

Please sign in to comment.