Skip to content

Commit

Permalink
Add InvitationLock tooltip on My Accounts (Joystream#3479) (Joystream…
Browse files Browse the repository at this point in the history
…#3878)

Co-authored-by: Joystream Stats <dev@joystreamstats.live>
  • Loading branch information
2 people authored and XxFlameCatxX committed Jan 14, 2023
1 parent dd5f304 commit 13f858b
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}
/>
)
}

0 comments on commit 13f858b

Please sign in to comment.