Trying to pass the connected wallet address into one of my view functions, but cannot get the address from the JSON object is there something I am missing here? Using wagmi to get signer from the connected wallet and I see the correct wallet showing in JsonRpcSigner JSON format in the browser console. I cannot pass signer, or signer[_address], or signer.address, or signer[0,1] through to viewProfileStrings(signer) function:
import { useContractRead, useContract, useSigner } from "wagmi";
const { data: signer, isError, isLoading } = useSigner();
console.log("here is the ", signer);
(async () => {
const function_return = await myContract.methods
.viewProfileStrings(signer)
.call();
console.log("info 1 attempt", function_return[0]);
setInfo(function_return[0]);
return function_return;
})();