From a24fc45ffee872a6bf98f614a9dc633f7a0c365b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Salgado?= Date: Wed, 8 Sep 2021 20:25:49 +0100 Subject: [PATCH] fix: DetailsRow memo function fix: cancel transaction button condition --- new-lamassu-admin/src/pages/Transactions/DetailsCard.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js index 61a5f105..a339d421 100644 --- a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js +++ b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js @@ -285,7 +285,7 @@ const DetailsRow = ({ it: tx, timezone }) => { ) : ( errorElements )} - {tx.txClass === 'cashOut' && getStatus(tx) !== 'Cancelled' && ( + {tx.txClass === 'cashOut' && getStatus(tx) === 'Pending' && ( { ) } -export default memo(DetailsRow) +export default memo( + DetailsRow, + (prev, next) => + prev.it.id === next.it.id && prev.it.hasError === next.it.hasError +)