Skip to content
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
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.28.0",
"version": "2.29.0",
"private": true,
"license": "AGPL-3.0-or-later",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const useStyles = makeStyles()((theme) => ({
width: '100%',
overflowY: 'scroll',
position: 'relative',
overscrollBehavior: 'contain',
gap: '10px',
scrollbarWidth: 'none',
'&::-webkit-scrollbar': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ const useStyles = makeStyles()((theme) => ({
},
iconContainer: {
position: 'absolute',
top: 'calc(50% - 10px)',
left: 'calc(50% - 10px)',
color: theme.palette.maskColor.main,
inset: '0',
margin: 'auto',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
pointerEvents: 'none',
},
}))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const useStyles = makeStyles()((theme) => ({
width: '100%',
overflowY: 'scroll',
position: 'relative',
overscrollBehavior: 'contain',
gap: '10px',
scrollbarWidth: 'none',
'&::-webkit-scrollbar': {
Expand Down
4 changes: 1 addition & 3 deletions packages/plugins/Gitcoin/src/SiteAdaptor/PreviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,11 @@ export function PreviewCard(props: PreviewCardProps) {
function RoundItem({ round }: { round: Round }) {
const { classes } = useStyles()

/* cspell:ignore allov */
const roundType =
(
/* cspell:disable-next-line */
round.strategyName === 'allov1.Direct' ||
/* cspell:disable-next-line */
round.strategyName === 'allov2.DirectGrantsSimpleStrategy' ||
/* cspell:disable-next-line */
round.strategyName === 'allov2.DirectGrantsLiteStrategy'
) ?
'Direct grants'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
isNativeTokenAddress,
NETWORK_DESCRIPTORS,
SchemaType,
useRedPacketConstants,
useRedPacketConstant,
} from '@masknet/web3-shared-evm'
import { Box, ListItem, Typography } from '@mui/material'
import { useQuery } from '@tanstack/react-query'
Expand Down Expand Up @@ -50,17 +50,18 @@ const useStyles = makeStyles<{ listItemBackground?: string; listItemBackgroundIc
contentItem: {
width: '100%',
borderRadius: 8,
position: 'static !important' as any,
position: 'relative',
height: 'auto !important',
padding: theme.spacing(1.5),
background: listItemBackground || DEFAULT_BACKGROUND,
[smallQuery]: {
padding: theme.spacing(2, 1.5),
},
'&:before': {
pointerEvents: 'none',
position: 'absolute',
content: '""',
top: 45,
bottom: 0,
left: 400,
zIndex: 0,
width: 114,
Expand Down Expand Up @@ -185,10 +186,10 @@ export const RedPacketInHistoryList = memo(function RedPacketInHistoryList(props
const { data: tokenAddress } = useRedpacketToken(chainId, history.trans_hash, seen && token_symbol === 'MATIC')
const { data: token } = useFungibleToken(NetworkPluginID.PLUGIN_EVM, tokenAddress, undefined, { chainId })
const tokenSymbol = token?.symbol ?? token_symbol
const contractAddress = useRedPacketConstants(chainId).HAPPY_RED_PACKET_ADDRESS_V4
const contractAddress = useRedPacketConstant(chainId, 'HAPPY_RED_PACKET_ADDRESS_V4')
const { data: redpacketRecord } = useQuery({
queryKey: ['redpacket', 'by-tx-hash', history.trans_hash],
queryFn: async () => RedPacketRPC.getRedPacketRecord(history.trans_hash),
queryFn: () => RedPacketRPC.getRedPacketRecord(history.trans_hash),
})
const { data: createSuccessResult } = useCreateRedPacketReceipt(history.trans_hash, chainId)
const isViewStatus = redpacket_status === FireflyRedPacketAPI.RedPacketStatus.View
Expand Down
4 changes: 2 additions & 2 deletions packages/web3-providers/src/Calendar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class Calendar {
return createPageable(
events,
indicator,
createNextIndicator(indicator, next && next !== '0' ? next : undefined),
next && next !== '0' ? createNextIndicator(indicator, next) : undefined,
)
}
static async getEventList(start_date: number, end_date: number, indicator?: PageIndicator) {
Expand All @@ -97,7 +97,7 @@ export class Calendar {
return createPageable(
events,
indicator,
createNextIndicator(indicator, next && next !== '0' ? next : undefined),
next && next !== '0' ? createNextIndicator(indicator, next) : undefined,
)
}
static async getAvailableDates(type: EventProvider, start_date: number, end_date: number) {
Expand Down
4 changes: 2 additions & 2 deletions packages/web3-shared/base/src/helpers/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export function transformAllHook<ChainId extends number, T>(getConstants: (chain
}
}

export function transformHook<ChainId extends number, T, K extends keyof T>(
export function transformHook<ChainId extends number, const T, const K extends keyof T>(
getConstant: (chainId: ChainId) => Partial<T>,
) {
return function useConstant(chainId: ChainId = 1 as ChainId, key?: K, fallback?: T[K]) {
return function useConstant<F extends K>(chainId: ChainId = 1 as ChainId, key?: F, fallback?: T[F]) {
return useMemo(() => {
if (!key) return fallback
return getConstant(chainId)[key] ?? fallback
Expand Down
Loading