Skip to content

Commit

Permalink
fix(ui): fix AddValidatorForm onSubmit regression (error if no token …
Browse files Browse the repository at this point in the history
…set) (#192)
  • Loading branch information
drichar authored May 28, 2024
1 parent 67c1a51 commit 85e95bd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ui/src/components/AddValidatorForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,11 @@ export function AddValidatorForm({ constraints }: AddValidatorFormProps) {
throw new Error('No active address')
}

if (!rewardToken) {
throw new Error('No reward token entered')
}

toast.loading('Sign transactions to add validator...', { id: toastId })

const rewardPerPayout = convertToBaseUnits(
values.rewardPerPayout,
rewardToken.params.decimals,
Number(values.rewardPerPayout),
rewardToken?.params.decimals || 0,
)

const epochRoundLength = getEpochLengthBlocks(
Expand Down

0 comments on commit 85e95bd

Please sign in to comment.