Skip to content

Commit

Permalink
🥩 2394 - Show correct stake required for the WG Opening (#2903)
Browse files Browse the repository at this point in the history
* Show correct stake required for the WG Opening.

* Pre-populate required stake with the minimum required stake.
  • Loading branch information
oleksanderkorn authored Apr 27, 2022
1 parent 63fed09 commit c5249e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const OpeningFormPreview = React.memo(({ opening }: OpeningFormPreviewPro
<RowGapBlock gap={4}>
<Label>Stake required</Label>
<TextInlineHuge>
<TokenValue value={200_000} />
<TokenValue value={opening.stake} />
</TextInlineHuge>
</RowGapBlock>
</Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ export const ApplyForRoleModal = () => {
})
const stakingAccount = form.watch('stake.account')

useEffect(() => {
form.setValue('stake.amount', opening.stake.toString())
}, [])

useEffect(() => {
if (stakingAccount) {
setStakingAccount(stakingAccount)
Expand Down

1 comment on commit c5249e0

@vercel
Copy link

@vercel vercel bot commented on c5249e0 Apr 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pioneer-2 – ./

pioneer-2.vercel.app
pioneer-2-joystream.vercel.app
pioneer-2-git-dev-joystream.vercel.app

Please sign in to comment.