Skip to content

Commit

Permalink
(launch) fix: allow empty agentIds
Browse files Browse the repository at this point in the history
  • Loading branch information
Atatakai authored and Atatakai committed Aug 28, 2024
1 parent d7fe4d9 commit 77ff2d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/launch/common-util/functions/stakingContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const getStakingContractInitPayload = ({
livenessPeriod,
timeForEmissions,
numAgentInstances,
agentIds: agentIds.split(/,\s?/).map((agentId) => Number(agentId)),
agentIds: agentIds ? agentIds.split(/,\s?/).map((agentId) => Number(agentId)) : [],
threshold,
configHash,
activityChecker,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ export const useFieldRules = (): StakingDepositRules => {
numAgentInstances: { rules: getGenericFieldRules(FieldConfig.numAgentInstances.name) },
agentIds: {
rules: [
...getGenericFieldRules(FieldConfig.agentIds.name),
{ ...FORM_VALIDATION.validateCommaSeparatedList },
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ const AgentIds: FC<{ address: Address }> = ({ address }) => {
return data.map((id) => (
<a
key={id}
href={`${REGISTRY_URL}${networkName}/services/${id}`}
href={`${REGISTRY_URL}ethereum/agents/${id}`}
className="mr-8"
target="_blank"
rel="noreferrer"
>
Expand Down

0 comments on commit 77ff2d9

Please sign in to comment.