From 731afe3a0938e356236ba8c3fa34659b396e938d Mon Sep 17 00:00:00 2001 From: ikprk Date: Tue, 4 Jun 2024 14:48:33 +0200 Subject: [PATCH] Skip metadata update on internal account --- .../src/components/_comments/Comment/InternalComment.tsx | 9 +++------ .../src/providers/transactions/transactions.hooks.ts | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/atlas/src/components/_comments/Comment/InternalComment.tsx b/packages/atlas/src/components/_comments/Comment/InternalComment.tsx index 6190120259..93249299a3 100644 --- a/packages/atlas/src/components/_comments/Comment/InternalComment.tsx +++ b/packages/atlas/src/components/_comments/Comment/InternalComment.tsx @@ -97,7 +97,6 @@ export const InternalComment: FC = ({ onEditClick, onDeleteClick, onReactionClick, - onOnBoardingPopoverOpen, reactions, onReplyClick, replyAvatars, @@ -167,15 +166,13 @@ export const InternalComment: FC = ({ const handleCommentReactionClick = useCallback( async (reactionId: CommentReaction) => { + onReactionClick?.(reactionId) + if (!reactionPopoverDismissed) { - setTempReactionId(reactionId) - await onOnBoardingPopoverOpen?.(reactionId) popoverRef.current?.show() - } else { - onReactionClick?.(reactionId) } }, - [onOnBoardingPopoverOpen, onReactionClick, reactionPopoverDismissed] + [onReactionClick, reactionPopoverDismissed] ) const sortedReactions = reactions && [...reactions].sort((a, b) => (b.count || 0) - (a.count || 0)) diff --git a/packages/atlas/src/providers/transactions/transactions.hooks.ts b/packages/atlas/src/providers/transactions/transactions.hooks.ts index bff9640941..12f74c3415 100644 --- a/packages/atlas/src/providers/transactions/transactions.hooks.ts +++ b/packages/atlas/src/providers/transactions/transactions.hooks.ts @@ -87,7 +87,7 @@ export const useTransaction = (): HandleTransactionFn => { return false } - if (isSignerMetadataOutdated && WALLETS_WITH_METADATA.includes(wallet?.extensionName ?? '')) { + if (isSignerMetadataOutdated && wallet?.extensionName && WALLETS_WITH_METADATA.includes(wallet.extensionName)) { await new Promise((resolve) => { openOngoingTransactionModal({ title: 'Update Wallet Metadata',