Skip to content

Commit

Permalink
🎖️ Fix on flashing validation when selecting staking account (#2852)
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw authored Apr 14, 2022
1 parent f9ad9aa commit 3e9f687
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/ui/src/memberships/model/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ export const StakingAccountSchema = Yup.object()
!areLocksConflicting(validationContext.stakeLock, validationContext.balances.locks)
)
})
.test('stakingStatus', 'Account might be bound to another member', (value, context) => {
if (!value) {
return true
}

.test('otherStatus', 'This account is bound to another member', (value, context) => {
const { stakingStatus } = context.options.context as IStakingAccountSchema

return stakingStatus !== 'unknown' && stakingStatus !== 'other'
return stakingStatus !== 'other'
})
.test('unknownStatus', '', (value, context) => {
const { stakingStatus } = context.options.context as IStakingAccountSchema
return stakingStatus !== 'unknown'
})

export const NewAddressSchema = (which: string) =>
Expand Down

1 comment on commit 3e9f687

@vercel
Copy link

@vercel vercel bot commented on 3e9f687 Apr 14, 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.