Hello,
I’m working on implementing Moralis’ endpoints to fetch any Ethereum wallet’s transactions. When testing the getWalletHistory endpoint, I’ve noticed I can’t include the internal transactions, or if I do, I can’t test an address that has any internal transaction, otherwise I’ll run into an error: MoralisError [Moralis SDK Core Error]: [C0500] Value is null.
This is a small scale code I’m using to test the endpoint:
async function fetch() {
try {
await Moralis.start({
apiKey: apiKey
});
const response = await Moralis.EvmApi.wallets.getWalletHistory({
chain: "0x1",
order: "DESC",
includeInternalTransactions: true,
address: "0x287B4470439Bb96BccBfC97e956bdF9676b79674",
nftMetadata: false,
});
console.log(response.raw().result);
} catch (e) {
console.error(e);
}
}
If I change the internal transfers to false, the endpoint will return the transactions correctly.
The online API tester doesn’t seem to run into this issue. Is it a problem in my end?
Thank you in advance!