From f49257e14cf0e545e4d90a0bca341f7bf13a6574 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 a05a99ee..f671391a 100644 --- a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js +++ b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js @@ -225,7 +225,7 @@ const DetailsRow = ({ it: tx }) => { ) : ( errorElements )} - {tx.txClass === 'cashOut' && getStatus(tx) !== 'Cancelled' && ( + {tx.txClass === 'cashOut' && getStatus(tx) === 'Pending' && ( { ) } -export default memo(DetailsRow, (prev, next) => prev.id === next.id) +export default memo( + DetailsRow, + (prev, next) => + prev.it.id === next.it.id && prev.it.hasError === next.it.hasError +)