Skip to content

Commit e1ba94d

Browse files
committed
Merge remote-tracking branch 'origin/fix/style-tune-c' into tmp/20250117
2 parents 843cb38 + 0470951 commit e1ba94d

File tree

2 files changed

+49
-5
lines changed

2 files changed

+49
-5
lines changed

_raw/locales/en/messages.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -2348,9 +2348,12 @@
23482348
"amount": "Amount",
23492349
"to": "To",
23502350
"selectChain": "Select Chain",
2351+
"selectAddr": "Select Address",
23512352
"recipientAddress": "Recipient address",
23522353
"destinationChain": "Destination chain",
2353-
"deductGasFees": "Received amount will deduct gas fees"
2354+
"deductGasFees": "Received amount will deduct gas fees",
2355+
"noEligibleAddr": "No eligible address for withdrawal",
2356+
"noEligibleChain": "No eligible chain for withdrawal"
23542357
},
23552358
"withdrawConfirmModal": {
23562359
"title": "Transferred to your DeBank L2 Wallet",

src/ui/views/GasAccount/components/WithdrawPopup.tsx

+45-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import React, { useEffect, useMemo, useState } from 'react';
22
import { useTranslation } from 'react-i18next';
3-
import { Popup, Item, TokenWithChain, AddressViewer } from '@/ui/component';
3+
import {
4+
Popup,
5+
Item,
6+
TokenWithChain,
7+
AddressViewer,
8+
Empty,
9+
} from '@/ui/component';
410
import { Button, message, Skeleton, Tooltip } from 'antd';
511
import { PopupProps } from '@/ui/component/Popup';
612
import { noop, set } from 'lodash';
@@ -299,7 +305,7 @@ const Selector = ({
299305
</div>
300306
</div>
301307
<div className="overflow-y-auto flex-1 relative px-20">
302-
{isSelectChain ? (
308+
{!sortedList?.length ? null : isSelectChain ? (
303309
<FixedSizeList<RechargeChainItem[]>
304310
width={'100%'}
305311
height={328}
@@ -320,6 +326,18 @@ const Selector = ({
320326
{AddressRow}
321327
</FixedSizeList>
322328
)}
329+
{!sortedList?.length && (
330+
<Empty
331+
className="mt-[75px]"
332+
title={
333+
<span className="text-13 text-r-neutral-foot text-center">
334+
{isSelectChain
335+
? t('page.gasAccount.withdrawPopup.noEligibleChain')
336+
: t('page.gasAccount.withdrawPopup.noEligibleAddr')}
337+
</span>
338+
}
339+
/>
340+
)}
323341
</div>
324342
</div>
325343
</Popup>
@@ -510,8 +528,12 @@ const WithdrawContent = ({
510528
/>
511529
</div>
512530
</div>
513-
) : (
531+
) : !selectedAccount ? (
514532
<AddressRightAreaInItem account={selectedAccount} />
533+
) : (
534+
<span className="text-15 font-medium text-r-neutral-title1">
535+
{t('page.gasAccount.withdrawPopup.selectAddr')}
536+
</span>
515537
)
516538
}
517539
hoverBorder={!loading}
@@ -527,8 +549,27 @@ const WithdrawContent = ({
527549
py={0}
528550
className="rounded-[6px] w-full h-[52px]"
529551
bgColor="var(--r-neutral-card2, #F2F4F7)"
552+
hoverBorder={!loading}
553+
right={loading ? () => null : undefined}
530554
left={
531-
chainInfo ? (
555+
loading ? (
556+
<div
557+
className={clsx('flex items-center gap-[6px] ', [
558+
'rounded-[2px]',
559+
])}
560+
>
561+
<Skeleton.Avatar
562+
className="rounded-[12px] w-[24px] h-[24px]"
563+
active
564+
/>
565+
<div className="flex flex-col overflow-hidden gap-[6px]">
566+
<Skeleton.Input
567+
className="rounded w-[89px] h-[16px]"
568+
active
569+
/>
570+
</div>
571+
</div>
572+
) : chainInfo ? (
532573
<div
533574
className={clsx('flex items-center gap-[6px] ', [
534575
'rounded-[2px]',

0 commit comments

Comments
 (0)