From 7c21622f983a0909c8a8ac01ddb690a327b47de8 Mon Sep 17 00:00:00 2001 From: Jordan Frankfurt Date: Wed, 18 Sep 2024 12:05:51 -0500 Subject: [PATCH] add more info to error/analytics calls --- .../Basenames/UsernameProfileSectionFrames/Context.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/web/src/components/Basenames/UsernameProfileSectionFrames/Context.tsx b/apps/web/src/components/Basenames/UsernameProfileSectionFrames/Context.tsx index 8c3667acce..153e9558e7 100644 --- a/apps/web/src/components/Basenames/UsernameProfileSectionFrames/Context.tsx +++ b/apps/web/src/components/Basenames/UsernameProfileSectionFrames/Context.tsx @@ -108,7 +108,7 @@ export function FramesProvider({ children }: FramesProviderProps) { const [frameInteractionError, setFrameInteractionError] = useState(''); const onTransaction: OnTransactionFunc = useCallback( - async ({ transactionData }) => { + async ({ transactionData, frame }) => { if (!address) { openConnectModal?.(); return null; @@ -131,7 +131,7 @@ export function FramesProvider({ children }: FramesProviderProps) { value: BigInt(params.value ?? 0), }); logEventWithContext('basename_profile_frame_transacted', ActionType.process, { - context: `value: ${params.value}`, + context: frame.postUrl ?? frame.title, }); return transactionId; } catch (error) { @@ -145,7 +145,7 @@ export function FramesProvider({ children }: FramesProviderProps) { setFrameInteractionError('Error sending transaction'); } - logError(error, 'failed to complete a frame transaction'); + logError(error, `${frame.postUrl ?? frame.title} failed to complete a frame transaction`); return null; } @@ -159,7 +159,7 @@ export function FramesProvider({ children }: FramesProviderProps) { [logError], ); const onSignature: OnSignatureFunc = useCallback( - async ({ signatureData }) => { + async ({ signatureData, frame }) => { if (!address) { openConnectModal?.(); return null; @@ -187,7 +187,7 @@ export function FramesProvider({ children }: FramesProviderProps) { setFrameInteractionError('Error signing data'); } - logError(error, 'failed to sign frame data'); + logError(error, `${frame.postUrl ?? frame.title} failed to sign frame data`); return null; }