useDApp
useDApp copied to clipboard
Why return array for uints and addresses?
Calling a contract function that returns an address, uint or enum gives the result in the first item of an array instead of just returning the value.
Is this on purpose? If so what is the reasoning?
Steps to reproduce:
const [
publicAddressInContractStorage,
publicEnumInStorage,
publicUintInStorage
] = useContractCalls(...)
returns 3 arrays of type string, big number and big number respectively instead of a single array with the values.
Noticed varying type conflicts in the useContractCall(s) methods too