Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 Track main hotfixes 17/06 #6421

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export const InternalComment: FC<InternalCommentProps> = ({
onEditClick,
onDeleteClick,
onReactionClick,
onOnBoardingPopoverOpen,
reactions,
onReplyClick,
replyAvatars,
Expand Down Expand Up @@ -169,15 +168,13 @@ export const InternalComment: FC<InternalCommentProps> = ({

const handleCommentReactionClick = useCallback(
async (reactionId: CommentReaction) => {
onReactionClick?.(reactionId)

if (!reactionPopoverDismissed) {
setTempReactionId(reactionId)
await onOnBoardingPopoverOpen?.(reactionId)
popoverRef.current?.show()
} else {
onReactionClick?.(reactionId)
}
},
[onOnBoardingPopoverOpen, onReactionClick, reactionPopoverDismissed]
[onReactionClick, reactionPopoverDismissed]
)

const sortedReactions = reactions && [...reactions].sort((a, b) => (b.count || 0) - (a.count || 0))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import BN from 'bn.js'
import { FC, PropsWithChildren } from 'react'

import { SvgActionInformative } from '@/assets/icons'
import { JoyTokenIcon } from '@/components/JoyTokenIcon'
import { NumberFormat } from '@/components/NumberFormat'
import { Text } from '@/components/Text'
import { Tooltip } from '@/components/Tooltip'

import { TextWithIcon, TooltipFooter, TooltipRow, TooltipWrapper, UpperRow } from './BalanceTooltip.styles'
import { TooltipText } from '@/components/Tooltip/Tooltip.styles'
import { atlasConfig } from '@/config'
import { ColorAnchor } from '@/views/global/YppLandingView/sections/YppRewardSection.styles'

type BalanceTooltipProps = PropsWithChildren<{
accountBalance: BN | undefined
Expand All @@ -17,7 +14,7 @@ type BalanceTooltipProps = PropsWithChildren<{

export const BalanceTooltip: FC<BalanceTooltipProps> = ({
accountBalance,
lockedAccountBalance = new BN(0),
// lockedAccountBalance = new BN(0),
containerRefElement,
children,
}) => {
Expand All @@ -33,34 +30,43 @@ export const BalanceTooltip: FC<BalanceTooltipProps> = ({
placement="bottom"
delay={[250, 0]}
customContent={
<TooltipWrapper>
<UpperRow>
<TooltipRow>
<Text as="span" variant="t100" color="colorText">
Spendable
</Text>
<TextWithIcon>
<JoyTokenIcon size={16} variant="gray" />
<NumberFormat
as="span"
variant="t200-strong"
value={lockedAccountBalance}
format="full"
color="colorText"
/>
</TextWithIcon>
</TooltipRow>
</UpperRow>
<TooltipFooter>
<SvgActionInformative />
<Text as="span" variant="t100" color="colorText">
Your transferable balance is zero, meaning you cannot buy NFTs or transfer tokens. There is a spendable
balance from faucet, which you can still spend on paying transaction fees for creating channels, posting
videos, adding comments and reactions. This balance needs to be repaid before accumulating transferable
balance.
</Text>
</TooltipFooter>
</TooltipWrapper>
<TooltipText as="span" variant="t100">
{atlasConfig.joystream.tokenTicker} token is a native crypto asset of Joystream blockchain which powers
{atlasConfig.general.appName}. It is used for trading Creator Tokens, NFTs and covering blockchain processing
fees. It is also used for voting on proposals and partaking in council elections.{' '}
<ColorAnchor href="https://www.joystream.org/token/" target="_blank">
Purchase {atlasConfig.joystream.tokenTicker}
</ColorAnchor>
</TooltipText>

// <TooltipWrapper>
// <UpperRow>
// <TooltipRow>
// <Text as="span" variant="t100" color="colorText">
// Spendable
// </Text>
// <TextWithIcon>
// <JoyTokenIcon size={16} variant="gray" />
// <NumberFormat
// as="span"
// variant="t200-strong"
// value={lockedAccountBalance}
// format="full"
// color="colorText"
// />
// </TextWithIcon>
// </TooltipRow>
// </UpperRow>
// <TooltipFooter>
// <SvgActionInformative />
// <Text as="span" variant="t100" color="colorText">
// Your transferable balance is zero, meaning you cannot buy NFTs or transfer tokens. There is a spendable
// balance from faucet, which you can still spend on paying transaction fees for creating channels, posting
// videos, adding comments and reactions. This balance needs to be repaid before accumulating transferable
// balance.
// </Text>
// </TooltipFooter>
// </TooltipWrapper>
}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const useTransaction = (): HandleTransactionFn => {
return false
}

if (isSignerMetadataOutdated && WALLETS_WITH_METADATA.includes(wallet?.extensionName ?? '')) {
if (isSignerMetadataOutdated && wallet?.extensionName && WALLETS_WITH_METADATA.includes(wallet.extensionName)) {
await new Promise((resolve) => {
openOngoingTransactionModal({
title: 'Update Wallet Metadata',
Expand Down
Loading
Loading