Skip to content

Commit

Permalink
fix: follow up acceptance reviews (#12073)
Browse files Browse the repository at this point in the history
  • Loading branch information
swkatmask authored Jan 24, 2025
1 parent 2f88678 commit bd707d1
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export const RedPacket = memo(function RedPacket({ payload, currentPluginID }: R
isEmpty={isEmpty}
isExpired={isExpired}
isRefunded={isRefunded}
hideContent={showRequirements}
claimedCount={+availability.claimed}
total={payload.total}
totalClaimed={minus(payload.total, payload.total_remaining || availability.balance).toFixed()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ const useStyles = makeStyles()((theme) => {
height: 24,
marginRight: '0px !important',
},
note: {
fontWeight: 700,
fontSize: 16,
},
}
})

Expand Down Expand Up @@ -386,9 +382,6 @@ export function ConditionSettings(props: HTMLProps<HTMLDivElement>) {
</div>
: null}
</div>
<Typography className={classes.note}>
Eligibility requires either being a Crypto Holder or an NFT Holder.
</Typography>
</div>
</ShadowRootPopper>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ interface Props extends HTMLProps<HTMLDivElement> {
isEmpty?: boolean
isExpired?: boolean
isRefunded?: boolean
/** content would be hidden if the conditions overlay shows */
hideContent?: boolean
creator: string
showConditionButton?: boolean
onClickCondition?(): void
Expand All @@ -166,6 +168,7 @@ export function RedPacketEnvelope({
isClaimed,
isExpired,
isRefunded,
hideContent,
isEmpty,
creator,
showConditionButton,
Expand All @@ -177,7 +180,7 @@ export function RedPacketEnvelope({
return (
<div {...props} className={cx(classes.container, props.className)}>
<img src={cover} className={classes.cover} />
<div className={classes.content}>
<div className={classes.content} style={{ display: hideContent ? 'none' : undefined }}>
<div className={classes.message}>
<TextOverflowTooltip as={ShadowRootTooltip} title={message} placement="top">
<Typography key={message} className={classes.text}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,7 @@ export function Erc20RedPacketConfirm() {
<div className={classes.conditionGroup}>
<div className={classes.field}>
<Typography component="span" className={classes.value}>
<Trans>
Holding {tokenQuantity ? `${formatTokenAmount(tokenQuantity, 0)}+` : 'any'}
</Trans>
<Trans>Holding {tokenQuantity ? `${tokenQuantity}+` : 'any'}</Trans>
</Typography>
</div>
<div className={classes.field}>
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/RedPacket/src/locale/en-US.po

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/plugins/RedPacket/src/locale/ja-JP.po

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/plugins/RedPacket/src/locale/ko-KR.po

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/plugins/RedPacket/src/locale/zh-CN.po

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/plugins/RedPacket/src/locale/zh-TW.po

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/shared/src/UI/components/Icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const useStyles = makeStyles<Pick<IconProps, 'size'>>()((theme, { size }) => ({
backgroundSize: 'cover',
height: size,
width: size,
fontWeight: 700,
},
}))

Expand Down
9 changes: 8 additions & 1 deletion packages/shared/src/UI/components/TokenIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ export const TokenIcon = memo(function TokenIcon(props: TokenIconProps) {
if (data && disableDefaultIcon) return null
const text = token?.name || token?.symbol || symbol || name || '?' // `?` prevent to fallback to avatar icon
const url = logoURL || token?.logoURL || data
const icon = <Icon {...rest} logoURL={url} name={text} />
const icon = (
<Icon
{...rest}
logoURL={url}
name={text}
style={{ fontSize: typeof rest.size === 'number' ? rest.size / 2 : undefined }}
/>
)

return (
<div className={cx(classes.container, className)} style={{ ...style, height: rest.size, width: rest.size }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ export function TokenTransactionConfirmModal({
name={token.symbol ?? token.name}
pluginID={token.runtime}
chainId={token.chainId}
badgeSize={20}
size={90}
disableBadge
/>
: <Icons.FillSuccess className={classes.icon} size={90} />}
<Typography className={classes.congratulation} mt="19.5px">
Expand Down

0 comments on commit bd707d1

Please sign in to comment.