Skip to content

Commit

Permalink
Fix transaction request display logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdbng committed Dec 12, 2017
1 parent 4456d5f commit 73237b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/screens/Main/components/Transactions.js
Expand Up @@ -81,7 +81,13 @@ const mapStateToProps = ({ device, transactions = [] }, { wallet = {} }) => ({
state !== ARCHIVED &&
(
[from.address, to.address].includes(wallet.address) ||
(!wallet.readOnly && state === REQUESTED && [from.device, to.device].includes(device.id))
(
state === REQUESTED &&
(
to.wallet === wallet.id || // Request from me: Only from the wallet I requested from
(from.device === device.id && !wallet.readOnly) // Request to me: show in all non-read-only wallets
)
)
)
)).sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt)),
});
Expand Down

0 comments on commit 73237b4

Please sign in to comment.