Skip to content

Commit

Permalink
Add InvitationLock tooltip on My Accounts (#3479) (#3878)
Browse files Browse the repository at this point in the history
Co-authored-by: Joystream Stats <dev@joystreamstats.live>
  • Loading branch information
traumschule and Joystream Stats authored Dec 20, 2022
1 parent 5cccf6d commit edc9453
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@ import { useGetMemberInvitedEventsQuery } from '@/memberships/queries'
import { LockItem } from '../LockItem'
import { LockDetailsProps } from '../types'

const tooltipLabel =
'Invitation lock can be spent on transaction fees and staking for proposals, voting and working groups applications. JOY tokens subject to this lock cannot be transferred to any other accounts. This lock is unrecoverable. NB: Transaction fees will first be taken from your transferable balance if it is positive.'

export const InvitationLockItem = ({ lock, address, isRecoverable }: LockDetailsProps) => {
const { data } = useGetMemberInvitedEventsQuery({ variables: { lockAccount: address } })
const eventData = data?.memberInvitedEvents[0]
const createdInEvent = eventData && asBlock(eventData)
const recoveryInfo = { unrecoverableLabel: 'Unrecoverable', tooltipLabel }

return (
<LockItem
lock={lock}
address={address}
isRecoverable={isRecoverable}
createdInEvent={createdInEvent}
lockRecovery={{ unrecoverableLabel: 'Unrecoverable' }}
lockRecovery={recoveryInfo}
/>
)
}

2 comments on commit edc9453

@vercel
Copy link

@vercel vercel bot commented on edc9453 Dec 20, 2022

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on edc9453 Dec 20, 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-git-dev-joystream.vercel.app
pioneer-2-joystream.vercel.app
pioneer-2.vercel.app

Please sign in to comment.