Browse Source

Make OperationDetails working for Pending Operations

master
Gaëtan Renaudeau 7 years ago
parent
commit
165c56aed1
  1. 8
      src/components/modals/OperationDetails.js

8
src/components/modals/OperationDetails.js

@ -61,10 +61,12 @@ const B = styled(Bar).attrs({
const operationSelector = createSelector( const operationSelector = createSelector(
accountSelector, accountSelector,
(_, { operationId }) => operationId, (_, { operationId }) => operationId,
(account, operationId) => { (account: Account, operationId: string): ?Operation => {
if (!account) return null if (!account) return null
const operation = account.operations.find(op => op.id === operationId) const maybeOp = account.operations.find(op => op.id === operationId)
return operation if (maybeOp) return maybeOp
const maybeOpPending = account.pendingOperations.find(op => op.id === operationId)
return maybeOpPending
}, },
) )

Loading…
Cancel
Save