From 849d545933b3183d27a48f7c3a746f877c29c8d7 Mon Sep 17 00:00:00 2001 From: Keith Date: Wed, 3 Jul 2024 12:17:41 +0900 Subject: [PATCH] fix: fix ckb holder calculation when btc holder count is undefined --- src/pages/Xudt/HolderAllocation.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/Xudt/HolderAllocation.tsx b/src/pages/Xudt/HolderAllocation.tsx index 366aaa8b5..e43b38cd8 100644 --- a/src/pages/Xudt/HolderAllocation.tsx +++ b/src/pages/Xudt/HolderAllocation.tsx @@ -14,8 +14,9 @@ const HolderAllocation = ({ }) => { const [t] = useTranslation() const total = Object.values(allocation).reduce((acc, cur) => acc + cur, 0) - const btc = allocation.BTC + const btc = +(allocation.BTC ?? 0) const ckb = total - btc + return (