Skip to content

Commit

Permalink
fixup! chore: remove nft redpacket
Browse files Browse the repository at this point in the history
  • Loading branch information
swkatmask committed Nov 22, 2024
1 parent fa4d41d commit 1dee5a3
Show file tree
Hide file tree
Showing 18 changed files with 10 additions and 468 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ export default function RedPacketDialog(props: RedPacketDialogProps) {
{step === CreateRedPacketPageStep.NewRedPacketPage ?
<>
<div
style={{
...(showHistory || showDetails ?
style={
showHistory || showDetails ?
{ display: 'none', height: 0 }
: { height: 'auto', paddingBottom: 100 }),
}}>
: { height: 'auto', paddingBottom: 100 }
}>
<RedPacketERC20Form
expectedChainId={chainId}
origin={settings}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 2 additions & 9 deletions packages/plugins/RedPacket/src/SiteAdaptor/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { createRenderWithMetadata, createTypedMessageMetadataReader } from '@masknet/typed-message-react'
import { EVMChainResolver } from '@masknet/web3-providers'
import type { RedPacketJSONPayload, RedPacketNftJSONPayload } from '@masknet/web3-providers/types'
import type { RedPacketJSONPayload } from '@masknet/web3-providers/types'
import { ChainId } from '@masknet/web3-shared-evm'
import { Ok, type Result } from 'ts-results-es'
import { RedPacketMetaKey, RedPacketNftMetaKey } from '../constants.js'
import schemaNtf from '../schema-nft.json'
import { RedPacketMetaKey } from '../constants.js'
import schema from '../schema.json'

const reader = createTypedMessageMetadataReader<RedPacketJSONPayload>(RedPacketMetaKey, schema)
Expand All @@ -29,9 +28,3 @@ export function RedPacketMetadataReader(
return result
}
export const renderWithRedPacketMetadata = createRenderWithMetadata(RedPacketMetadataReader)

export const RedPacketNftMetadataReader = createTypedMessageMetadataReader<RedPacketNftJSONPayload>(
RedPacketNftMetaKey,
schemaNtf,
)
export const renderWithRedPacketNftMetadata = createRenderWithMetadata(RedPacketNftMetadataReader)

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { useLastRecognizedIdentity } from '@masknet/plugin-infra/content-script'
import { NetworkPluginID } from '@masknet/shared-base'
import { useChainContext, useNetworkContext } from '@masknet/web3-hooks-base'
import { FireflyRedPacket } from '@masknet/web3-providers'
import type { RedPacketJSONPayload, RedPacketNftJSONPayload } from '@masknet/web3-providers/types'
import type { RedPacketJSONPayload } from '@masknet/web3-providers/types'
import { useQuery } from '@tanstack/react-query'
import { usePlatformType } from './usePlatformType.js'

export function useClaimStrategyStatus(payload: RedPacketJSONPayload | RedPacketNftJSONPayload) {
export function useClaimStrategyStatus(payload: RedPacketJSONPayload) {
const platform = usePlatformType()
const { pluginID } = useNetworkContext()
const rpid = 'rpid' in payload ? payload.rpid : payload.id
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1dee5a3

Please sign in to comment.