fix: DetailsRow memo function

fix: cancel transaction button condition
This commit is contained in:
Sérgio Salgado 2021-09-08 20:25:49 +01:00 committed by Josh Harvey
parent d3c5ef92f1
commit a24fc45ffe

View file

@ -285,7 +285,7 @@ const DetailsRow = ({ it: tx, timezone }) => {
) : (
errorElements
)}
{tx.txClass === 'cashOut' && getStatus(tx) !== 'Cancelled' && (
{tx.txClass === 'cashOut' && getStatus(tx) === 'Pending' && (
<ActionButton
color="primary"
Icon={CancelIcon}
@ -338,4 +338,8 @@ const DetailsRow = ({ it: tx, timezone }) => {
)
}
export default memo(DetailsRow)
export default memo(
DetailsRow,
(prev, next) =>
prev.it.id === next.it.id && prev.it.hasError === next.it.hasError
)