1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

Get correct transaction label (#1270)

* get correct transaction label

* remove log

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
This commit is contained in:
claudiaHash 2022-03-28 17:48:51 +03:00 committed by GitHub
parent 9df8ed49a3
commit 2e74d42edb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(