-
- {t('plugin_red_packet_from', { name: payload.sender.name ?? '-' })}
-
{/* it might be fontSize: 12 on twitter based on theme? */}
{canFetch && listOfStatus.length ? (
@@ -274,90 +288,101 @@ export function RedPacket(props: RedPacketProps) {
{payload.sender.message}
-
- {(() => {
- if (listOfStatus.includes(RedPacketStatus.expired) && canRefund)
- return t('plugin_red_packet_description_refund', {
- balance: formatBalance(availability.balance, token.decimals),
- symbol: token.symbol,
- })
- if (listOfStatus.includes(RedPacketStatus.claimed))
- return t(
- 'plugin_red_packet_description_claimed',
- (availability as RedPacketAvailability).claimed_amount
- ? {
- amount: formatBalance(
- (availability as RedPacketAvailability).claimed_amount,
- token.decimals,
- ),
- symbol: token.symbol,
- }
- : { amount: '', symbol: '' },
- )
- if (listOfStatus.includes(RedPacketStatus.refunded))
- return t('plugin_red_packet_description_refunded')
- if (listOfStatus.includes(RedPacketStatus.expired))
- return t('plugin_red_packet_description_expired')
- if (listOfStatus.includes(RedPacketStatus.empty))
- return t('plugin_red_packet_description_empty')
- if (!payload.password) return t('plugin_red_packet_description_broken')
- return t('plugin_red_packet_description_failover', {
- total: formatBalance(payload.total, token.decimals),
- symbol: token.symbol,
- name: payload.sender.name ?? '-',
- shares: payload.shares ?? '-',
- })
- })()}
+ {subtle}
+
+ {t('plugin_red_packet_from', { name: payload.sender.name ?? '-' })}
-
-
- {canClaim || canRefund ? (
-