From d3a95d4100fce2876607adf5be5f3fff2537c19f Mon Sep 17 00:00:00 2001 From: aeolian <94939382+aeolianeth@users.noreply.github.com> Date: Mon, 30 Dec 2024 21:57:04 +1000 Subject: [PATCH] edit logs --- .../ContractReader/useContractReadValue.ts | 12 +++++------- .../ContractReader/util/useCallContractRead.ts | 17 +++++++---------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/hooks/ContractReader/useContractReadValue.ts b/src/hooks/ContractReader/useContractReadValue.ts index 5b8e7ac771..fad02767ef 100644 --- a/src/hooks/ContractReader/useContractReadValue.ts +++ b/src/hooks/ContractReader/useContractReadValue.ts @@ -57,13 +57,11 @@ export function useContractReadValue({ const newValue = _formatter(result) if (_valueDidChange(value, newValue)) { - console.info( - `📗 New >`, - functionName, - { args }, - { newValue }, - { contract: readContract?.address }, - ) + console.info(`📗 New >`, functionName, { + args, + newValue, + contract: readContract?.address, + }) setValue(newValue) } } catch (err) { diff --git a/src/hooks/ContractReader/util/useCallContractRead.ts b/src/hooks/ContractReader/util/useCallContractRead.ts index 064f8a4d3d..a235b411aa 100644 --- a/src/hooks/ContractReader/util/useCallContractRead.ts +++ b/src/hooks/ContractReader/util/useCallContractRead.ts @@ -19,16 +19,13 @@ export async function callContractRead({ try { console.info(`📚 Read >`, functionName) return await readContract[functionName](...(args ?? [])) - } catch (err) { - console.error( - `📕 Read error >`, - functionName, - { args }, - { err }, - { contract: readContract.address }, - { contracts }, - ) + } catch (error) { + console.error(`📕 Read error >`, functionName, error, { + args, + contract: readContract.address, + contracts, + }) - throw err + throw error } }