From 3ccc9085bd516f4ad5688420cff1f2903743ee79 Mon Sep 17 00:00:00 2001 From: Adam Gall Date: Fri, 3 May 2024 13:34:02 -0400 Subject: [PATCH] Don't silently fail when function encoding doesn't work --- src/utils/crypto.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/utils/crypto.ts b/src/utils/crypto.ts index be38293b2f..77290a8c42 100644 --- a/src/utils/crypto.ts +++ b/src/utils/crypto.ts @@ -1,5 +1,4 @@ import { encodeFunctionData, parseAbiParameters } from 'viem'; -import { logError } from '../helpers/errorLogging'; import { ActivityTransactionType } from '../types'; function splitIgnoreBrackets(str: string): string[] { @@ -72,16 +71,11 @@ export const encodeFunction = ( } }); - try { - return encodeFunctionData({ - functionName: _functionName, - args: parametersFixedWithBool, - abi: parseAbiParameters(_functionSignature || ''), - }); - } catch (e) { - logError(e); - return; - } + return encodeFunctionData({ + functionName: _functionName, + args: parametersFixedWithBool, + abi: parseAbiParameters(_functionSignature || ''), + }); }; export function isMultiSigTx(transaction: ActivityTransactionType): boolean {