From f26762ca47665b01f1cbb55efb730d1c2fd0ed24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E5=9B=BD=E5=AE=87?= <841185308@qq.com> Date: Mon, 11 Nov 2024 10:08:09 +0800 Subject: [PATCH] fix: Use median as the fee rate (#3246) Co-authored-by: Chen Yu --- .../src/utils/hooks/useGetCountDownAndFeeRateStats.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/neuron-ui/src/utils/hooks/useGetCountDownAndFeeRateStats.ts b/packages/neuron-ui/src/utils/hooks/useGetCountDownAndFeeRateStats.ts index 1171ceccdf..fa6f181910 100644 --- a/packages/neuron-ui/src/utils/hooks/useGetCountDownAndFeeRateStats.ts +++ b/packages/neuron-ui/src/utils/hooks/useGetCountDownAndFeeRateStats.ts @@ -18,8 +18,8 @@ const useGetCountDownAndFeeRateStats = ({ seconds = 30, interval = 1000 }: Count const handleGetFeeRateStatis = useCallback(() => { getFeeRateStatistics() .then(res => { - const { mean, median } = res ?? {} - const suggested = mean && median ? Math.max(1000, Number(mean), Number(median)) : MEDIUM_FEE_RATE + const { median } = res ?? {} + const suggested = median ? Math.max(1000, Number(median)) : MEDIUM_FEE_RATE setFeeFatestatsData(states => ({ ...states, ...res, suggestFeeRate: suggested })) })