From 2e74d42edb12bfaf7158a01113c0ad3cea12a31d Mon Sep 17 00:00:00 2001 From: claudiaHash <49017601+claudiaHash@users.noreply.github.com> Date: Mon, 28 Mar 2022 17:48:51 +0300 Subject: [PATCH] Get correct transaction label (#1270) * get correct transaction label * remove log Co-authored-by: ClaudiaHolhos --- src/components/@shared/PoolTransactions/Title.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/@shared/PoolTransactions/Title.tsx b/src/components/@shared/PoolTransactions/Title.tsx index b4cdb62c6..4c2de1f05 100644 --- a/src/components/@shared/PoolTransactions/Title.tsx +++ b/src/components/@shared/PoolTransactions/Title.tsx @@ -52,9 +52,12 @@ function getTitle(row: PoolTransaction, locale: string) { } case 'JOIN': case 'EXIT': { - const tokenMoved = row.baseTokenValue > 0 ? row.baseToken : row.datatoken + const tokenMoved = + Math.abs(row.baseTokenValue) > 0 ? row.baseToken : row.datatoken const tokenValueMoved = - row.baseTokenValue > 0 ? row.baseTokenValue : row.datatokenValue + Math.abs(row.baseTokenValue) > 0 + ? row.baseTokenValue + : row.datatokenValue const tokenSymbol = tokenMoved.symbol title += `${row.type === 'JOIN' ? 'Add' : 'Remove'} ${formatPrice(