From feaf4062e575b86937296d850b4ec0f5d334fa6a Mon Sep 17 00:00:00 2001 From: DMY <147dmy@gmail.com> Date: Wed, 13 Nov 2024 18:02:05 +0800 Subject: [PATCH] fix: bridge show more --- src/ui/utils/portfolio/project.ts | 2 ++ src/ui/utils/token.ts | 1 + src/ui/views/Bridge/Component/BridgeContent.tsx | 4 ++++ src/ui/views/Bridge/Component/BridgeShowMore.tsx | 13 ++++++++----- src/ui/views/Bridge/hooks/token.tsx | 4 ++-- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/ui/utils/portfolio/project.ts b/src/ui/utils/portfolio/project.ts index f5001bdb044..d9289debabb 100644 --- a/src/ui/utils/portfolio/project.ts +++ b/src/ui/utils/portfolio/project.ts @@ -320,6 +320,7 @@ export class DisplayedToken implements AbstractPortfolioToken { time_at: number; price_24h_change?: number | null; low_credit_score?: boolean; + raw_amount_hex_str?: string; _amountStr?: string; _priceStr?: string; _amountChange?: number; @@ -359,6 +360,7 @@ export class DisplayedToken implements AbstractPortfolioToken { this.time_at = token.time_at; this.price_24h_change = token.price_24h_change; this.low_credit_score = token.low_credit_score; + this.raw_amount_hex_str = token.raw_amount_hex_str; // 默认是它 this._usdValueChangeStr = '-'; diff --git a/src/ui/utils/token.ts b/src/ui/utils/token.ts index 5654bb16ddd..f5a619a61b3 100644 --- a/src/ui/utils/token.ts +++ b/src/ui/utils/token.ts @@ -161,6 +161,7 @@ export const abstractTokenToTokenItem = ( chain: token.chain, amount: token.amount, raw_amount: token.raw_amount, + raw_amount_hex_str: token.raw_amount_hex_str, decimals: token.decimals, display_symbol: token.display_symbol, is_core: token.is_core, diff --git a/src/ui/views/Bridge/Component/BridgeContent.tsx b/src/ui/views/Bridge/Component/BridgeContent.tsx index d2db4039161..bc235322366 100644 --- a/src/ui/views/Bridge/Component/BridgeContent.tsx +++ b/src/ui/views/Bridge/Component/BridgeContent.tsx @@ -354,6 +354,8 @@ export const BridgeContent = () => { quoteLoading || !quoteList?.length; + const [showMoreOpen, setShowMoreOpen] = useState(false); + return (