Skip to content

Commit db78e1d

Browse files
[Release] New release 2.31.0 (minor) (#12074)
* chore: bump version to 2.31.0 * refactor: rename ERC20RedPacket to TokenRedPacket (#12075) * fix: connect/change wallet label (#12076) * fix: get redpacket state without parse api (#12077) * fix: token badge icon (#12078) * fix: token badge icon * fix: solana redpacket expired * fix: adjust layout in token approval (#12079) * fix: hard code fix for virtual on base (#12080) --------- Co-authored-by: Wukong Sun <[email protected]>
1 parent c5e03df commit db78e1d

File tree

55 files changed

+484
-371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+484
-371
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"yarn": ">=999.0.0",
99
"npm": ">=999.0.0"
1010
},
11-
"version": "2.30.0",
11+
"version": "2.31.0",
1212
"private": true,
1313
"license": "AGPL-3.0-or-later",
1414
"scripts": {

packages/mask/popups/pages/Wallet/Interaction/WatchTokenRequest.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export const WatchTokenRequest = memo<InteractionItemProps>((props) => {
9292
address={address}
9393
name={symbol}
9494
size={60}
95+
disableBadge
9596
/>
9697
{isTrustedName ?
9798
asset?.name

packages/mask/popups/pages/Wallet/TokenDetail/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ export const TokenDetailUI = memo(function TokenDetailUI(props: TokenDetailUIPro
266266
chainId={asset.chainId}
267267
logoURL={asset.logoURL}
268268
size={16}
269+
disableBadge
269270
/>
270271
<FormattedBalance
271272
value={balance}

packages/mask/popups/pages/Wallet/Transfer/FungibleTokenSection.tsx

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Icons } from '@masknet/icons'
2-
import { NetworkIcon, ProgressiveText, TokenIcon, useAvailableBalance } from '@masknet/shared'
2+
import { ProgressiveText, TokenIcon, useAvailableBalance } from '@masknet/shared'
33
import { NetworkPluginID } from '@masknet/shared-base'
44
import { ActionButton, MaskColors, makeStyles, usePopupCustomSnackbar } from '@masknet/theme'
55
import type { Web3Helper } from '@masknet/web3-helpers'
@@ -13,13 +13,7 @@ import {
1313
} from '@masknet/web3-hooks-base'
1414
import { useGasLimit } from '@masknet/web3-hooks-evm'
1515
import { isLessThan, isLte, isZero, leftShift, minus, rightShift } from '@masknet/web3-shared-base'
16-
import {
17-
SchemaType,
18-
isNativeTokenAddress,
19-
type ChainId,
20-
type GasConfig,
21-
getNativeTokenAddress,
22-
} from '@masknet/web3-shared-evm'
16+
import { SchemaType, isNativeTokenAddress, type GasConfig, getNativeTokenAddress } from '@masknet/web3-shared-evm'
2317
import { Box, Input, Typography } from '@mui/material'
2418
import { BigNumber } from 'bignumber.js'
2519
import { memo, useCallback, useMemo, useState } from 'react'
@@ -47,17 +41,6 @@ const useStyles = makeStyles()((theme) => ({
4741
tokenPicker: {
4842
margin: theme.spacing(0, 2),
4943
},
50-
tokenIcon: {
51-
width: 36,
52-
height: 36,
53-
},
54-
badgeIcon: {
55-
position: 'absolute',
56-
right: -6,
57-
bottom: -4,
58-
border: `1px solid ${theme.palette.common.white}`,
59-
borderRadius: '50%',
60-
},
6144
maxButton: {
6245
cursor: 'pointer',
6346
},
@@ -248,21 +231,7 @@ export const FungibleTokenSection = memo(function FungibleTokenSection() {
248231
})
249232
if (picked) handleSelectAsset(picked as Web3Helper.FungibleAssetAll)
250233
}}>
251-
<Box position="relative" height={36} width={36}>
252-
<TokenIcon
253-
className={classes.tokenIcon}
254-
chainId={chainId}
255-
address={address}
256-
logoURL={selectedAsset?.logoURL}
257-
/>
258-
<NetworkIcon
259-
pluginID={NetworkPluginID.PLUGIN_EVM}
260-
chainId={network?.chainId as ChainId}
261-
className={classes.badgeIcon}
262-
size={16}
263-
network={network}
264-
/>
265-
</Box>
234+
<TokenIcon size={36} chainId={chainId} address={address} logoURL={selectedAsset?.logoURL} />
266235
<Box mr="auto" ml={2}>
267236
<ProgressiveText loading={isPending} skeletonWidth={36}>
268237
{token?.symbol}

packages/mask/popups/pages/Wallet/components/AssetsList/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ const AssetItem = memo(function AssetItem({ asset, onItemClick, ...rest }: Asset
143143
name={asset.name}
144144
logoURL={asset.logoURL}
145145
size={36}
146+
disableBadge
146147
/>
147148
<NetworkIcon
148149
pluginID={NetworkPluginID.PLUGIN_EVM}

packages/plugins/Approval/src/SiteAdaptor/ApprovalTokenContent.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ const useStyles = makeStyles<{ listItemBackground?: string; listItemBackgroundIc
8383
spenderLogoIcon: {
8484
width: 16,
8585
height: 16,
86-
marginRight: 4,
8786
},
8887
link: {
8988
width: 16,
@@ -95,7 +94,6 @@ const useStyles = makeStyles<{ listItemBackground?: string; listItemBackgroundIc
9594
},
9695
spenderMaskLogoIcon: {
9796
display: 'inline-block',
98-
marginRight: 4,
9997
width: 16,
10098
height: 16,
10199
'& > svg': {
@@ -249,11 +247,15 @@ function ApprovalTokenItem(props: ApprovalTokenItemProps) {
249247
</div>
250248
<div>
251249
<Typography className={classes.secondaryText}>
252-
<Trans>Approved Amount</Trans>
250+
<Trans>
251+
Approved Amount{' '}
252+
{amount ?
253+
<Typography component="span" className={classes.primaryText}>
254+
{formatSpendingCap(amount)}
255+
</Typography>
256+
: null}
257+
</Trans>
253258
</Typography>
254-
{amount ?
255-
<Typography className={classes.primaryText}>{formatSpendingCap(amount)}</Typography>
256-
: null}
257259
</div>
258260
</div>
259261
<ChainBoundary

packages/plugins/Approval/src/locale/en-US.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/plugins/Approval/src/locale/en-US.po

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/plugins/Approval/src/locale/ja-JP.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/plugins/Approval/src/locale/ja-JP.po

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)