aptos-labs / aptos-ts-sdk

An SDK for accessing the Aptos blockchain data, submitting transactions, and more!
https://aptos-labs.github.io/aptos-ts-sdk/
Apache License 2.0
74 stars 43 forks source link

[Bug] getModuleEventsByEventType not respecting pagination params #446

Closed 0xbe1 closed 3 months ago

0xbe1 commented 3 months ago

🐛 Bug Description

How to reproduce

Code snippet to reproduce

main();

async function main() {
    const events = await aptos.getModuleEventsByEventType({
      eventType: "0xfaf4e633ae9eb31366c9ca24214231760926576c7b625313b3688b5e900731f6::staking::StakeAPTEvent",
      options: {
        limit: 2,
      },
    });

    console.log(events.length); // 100 instead of 2
}

System information

System details: