Skip to content

Commit

Permalink
[Release] Hotfix 2.29.2 => 2.29.3 (patch) (#11991)
Browse files Browse the repository at this point in the history
* chore: bump version to v2.29.3

* fix: mf-6517 report after claiming redpacket on twitter (#11992)

* fix: redpacket claimed with user's other wallet (#11993)

* fix: redpacket claimed with user's other wallet

* fix: run codegen

---------

Co-authored-by: swkatmask <[email protected]>

---------

Co-authored-by: Wukong Sun <[email protected]>
Co-authored-by: swkatmask <[email protected]>
  • Loading branch information
3 people authored Dec 16, 2024
1 parent b2e422c commit 9062217
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"yarn": ">=999.0.0",
"npm": ">=999.0.0"
},
"version": "2.29.2",
"version": "2.29.3",
"private": true,
"license": "AGPL-3.0-or-later",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ export function createSiteAdaptorSpecializedPostContext(site: EnhanceableSite, a
const version = new ValueRef<SupportedPayloadVersions | undefined>(undefined)
return {
author: author.author,
source: null,
handle: NULL,
coAuthors: opt.coAuthors,
avatarURL: author.avatarURL,
nickname: author.nickname,
site,
source: opt.source,
postID: author.postID,

get rootNode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function registerPostCollectorInner(
isFocusing: isDetailTweet(tweetNode),
suggestedInjectionPoint: tweetNode,
...refs.subscriptions,
source: 'Twitter',
})
function run() {
collectPostInfo(tweetNode, refs, cancel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
import { NetworkIcon, TokenIcon } from '@masknet/shared'
import { NetworkPluginID } from '@masknet/shared-base'
import { makeStyles } from '@masknet/theme'
import { formatBalance, type FungibleToken } from '@masknet/web3-shared-base'
import { formatBalance, isZero, type FungibleToken } from '@masknet/web3-shared-base'
import { type ChainId, type SchemaType } from '@masknet/web3-shared-evm'
import { Typography } from '@mui/material'
import type { HTMLProps } from 'react'
Expand Down Expand Up @@ -160,6 +160,7 @@ export function RedPacketEnvelope({
...props
}: Props) {
const { classes, cx } = useStyles()
const claimedZero = isZero(claimedAmount)
return (
<div {...props} className={cx(classes.container, props.className)}>
<img src={cover} className={classes.cover} />
Expand All @@ -181,18 +182,25 @@ export function RedPacketEnvelope({
chainId={token.chainId}
/>
</div>
<Typography className={classes.amount}>
{isClaimed ?
formatBalance(claimedAmount, token.decimals)
: `${formatBalance(totalClaimed, token.decimals)} / ${formatBalance(total, token.decimals)}`
}{' '}
{token.symbol}
</Typography>
{isClaimed ?
<Typography className={classes.amount}>
{claimedZero ?
<Trans>You have already claimed this lucky drop.</Trans>
: `${formatBalance(claimedAmount, token.decimals)} ${token.symbol}`}
</Typography>
: <Typography className={classes.amount}>
{`${formatBalance(totalClaimed, token.decimals)} / ${formatBalance(total, token.decimals)} `}
{token.symbol}
</Typography>
}
<div className={classes.status}>
{isClaimed ?
<Typography className={classes.statusText}>
<Trans>Congratulations!</Trans>
</Typography>
claimedZero ?
null
: <Typography className={classes.statusText}>
<Trans>Congratulations!</Trans>
</Typography>

: isEmpty ?
<>
<div className={classes.bar}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const RedPacket = memo(function RedPacket({ payload }: RedPacketProps) {
const [{ loading: isClaiming, value: claimTxHash }, claimCallback] = useClaimCallback(account, payload)
const site = usePostInfoDetails.site()
const source = usePostInfoDetails.source()
const platform = source?.toLowerCase() as 'lens' | 'farcaster'
const platform = source?.toLowerCase()
const isOnFirefly = site === EnhanceableSite.Firefly
const postUrl = usePostInfoDetails.url()
const handle = usePostInfoDetails.handle()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {
useLastRecognizedIdentity,
usePostInfoPostMetadataImages,
usePostInfoSite,
usePostInfoSource,
} from '@masknet/plugin-infra/content-script'
import { EnhanceableSite, NetworkPluginID } from '@masknet/shared-base'
import { NetworkPluginID } from '@masknet/shared-base'
import { useChainContext, useNetworkContext } from '@masknet/web3-hooks-base'
import { FireflyRedPacket } from '@masknet/web3-providers'
import type { FireflyRedPacketAPI } from '@masknet/web3-providers/types'
Expand All @@ -25,12 +24,10 @@ export function useParseRedPacket(chainId: ChainId) {
const source = usePostInfoSource()
const me = useLastRecognizedIdentity()
const myProfileId = me?.profileId
const site = usePostInfoSite()
const isOnFirefly = site === EnhanceableSite.Firefly

const query = useQuery({
enabled: images.length > 0 && isOnFirefly,
queryKey: ['red-packet', 'parse', source, images[0], account],
enabled: images.length > 0,
queryKey: ['red-packet', 'parse', source?.toLowerCase(), images[0], account],
queryFn: async () => {
const platform = source?.toLowerCase() as FireflyRedPacketAPI.PlatformType
return FireflyRedPacket.parse({
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/RedPacket/src/locale/en-US.json

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

4 changes: 4 additions & 0 deletions 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.

1 change: 1 addition & 0 deletions packages/plugins/RedPacket/src/locale/ja-JP.json

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

4 changes: 4 additions & 0 deletions 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.

1 change: 1 addition & 0 deletions packages/plugins/RedPacket/src/locale/ko-KR.json

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

4 changes: 4 additions & 0 deletions 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.

1 change: 1 addition & 0 deletions packages/plugins/RedPacket/src/locale/zh-CN.json

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

4 changes: 4 additions & 0 deletions 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.

1 change: 1 addition & 0 deletions packages/plugins/RedPacket/src/locale/zh-TW.json

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

4 changes: 4 additions & 0 deletions 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.

0 comments on commit 9062217

Please sign in to comment.