From 28ce0c3cedf7ee0c848b01e04f8e422321f1022e Mon Sep 17 00:00:00 2001 From: Pete Watters <2938440+pete-watters@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:19:09 +0100 Subject: [PATCH] fix: try fix copy --- src/app/pages/receive/receive-btc.tsx | 5 ++--- src/app/pages/receive/receive-stx.tsx | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/pages/receive/receive-btc.tsx b/src/app/pages/receive/receive-btc.tsx index 5ed7a60fef9..002fba70e7e 100644 --- a/src/app/pages/receive/receive-btc.tsx +++ b/src/app/pages/receive/receive-btc.tsx @@ -1,4 +1,3 @@ -import { useCallback } from 'react'; import toast from 'react-hot-toast'; import { useLocation } from 'react-router-dom'; @@ -29,11 +28,11 @@ export function ReceiveBtcModal({ type = 'btc' }: ReceiveBtcModalType) { const { onCopy } = useClipboard(btcAddress); - const copyToClipboard = useCallback(() => { + function copyToClipboard() { void analytics.track('copy_btc_address_to_clipboard'); toast.success('Copied to clipboard!'); onCopy(); - }, [analytics, onCopy]); + } return ( { + function copyToClipboard() { void analytics.track('copy_stx_address_to_clipboard'); - toast.success('Copied to clipboard!'); + toast.success('Copied to clipboard'); onCopy(); - }, [analytics, onCopy]); + } if (!currentAccount) return null;