I’m using Moralis.Web3.getTransactions(); to get a users transaction history.
There are random transactions in the returned array that aren’t that users.
React code:
state = {
transactions: [],
};
async componentDidMount() {
const transactions = await Moralis.Web3.getTransactions();
this.setState({ transactions });
}
You can see nonce 504134 and 0 here from addresses 0xeb2629a2734e272bcc07bda959863f316f4bd4cf and 0x9fad9ff4af0f465660cbcd8305860167a96a5a6c
Everything else is from 0x1f32d336a052237248b7a40e44dce057e8c2c8d0 (which is the current logged in user).
How do i get rid of random users transactions?