From 32690248342be9912b118b35c31d5267d29b8aff Mon Sep 17 00:00:00 2001 From: mikozet <95082155+mikozet@users.noreply.github.com> Date: Fri, 16 Jun 2023 13:27:06 +0200 Subject: [PATCH] Remove received transactions notification from other wallets (#686) --- src/store/activity/actions.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/store/activity/actions.js b/src/store/activity/actions.js index 60de2a4a..48541da5 100644 --- a/src/store/activity/actions.js +++ b/src/store/activity/actions.js @@ -139,13 +139,19 @@ export function checkFinishedActivities({ const lastReceivedTransactionDate = DateTime.fromISO( getLastReceivedTransaction(), ); + for await (const receivedTransferActivity of activities) { if (receivedTransferActivity.type === ActivityTypes.HUB_TRANSFER) { const receivedTransferActivityDate = DateTime.fromSeconds( receivedTransferActivity.timestamp, ); - if (receivedTransferActivityDate > lastReceivedTransactionDate) { - const sender = receivedTransferActivity?.data?.from; + + const sender = receivedTransferActivity?.data?.from; + + if ( + receivedTransferActivityDate > lastReceivedTransactionDate && + sender !== safe.currentAccount + ) { let senderName = ''; const senderData = await resolveUsernames([sender], true); if (sender in senderData) {