From ec7dc4fccde6ce71e0c6ec34166308182e68b129 Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Wed, 25 May 2022 15:17:44 +0100 Subject: [PATCH] UI improvement for low number of pool shares (#1476) * UI iprovement for low number of pool shares * Fixing comparison logic Co-authored-by: Matthias Kretschmann Co-authored-by: Matthias Kretschmann --- src/components/molecules/Migration/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/molecules/Migration/index.tsx b/src/components/molecules/Migration/index.tsx index e9cac2bf3..16cb733a0 100644 --- a/src/components/molecules/Migration/index.tsx +++ b/src/components/molecules/Migration/index.tsx @@ -53,9 +53,10 @@ export default function Migration(): ReactElement { const content = data.content.edges[0].node.childContentJson function getNoLockedSharesMessage() { - const poolSharesRounded = isNaN(Number(poolShares)) - ? 0 - : Number(poolShares).toFixed(3) + const poolSharesRounded = + Number(poolShares) <= 0.001 + ? 'less than 0.001' + : Number(poolShares).toFixed(3) return `\n\nYou currently have ${poolSharesRounded} pool shares\n\nYou have locked 0 shares` } function getLockedSharesMessage(lockedShares: number) {