Skip to content

Conversation

gtupak
Copy link
Collaborator

@gtupak gtupak commented Oct 6, 2023

Closes https://github.com/arcxmoney/sdk-api/issues/469

It is sometimes possible that the cached chainId to be undefined at the moment when TRANSACTION_TRIGGERED is to be fired, causing us to submit the event without a chainId.

In such cases, this PR now requests eth_chainId on the provider in an attempt to populate it.
While at it, I also extracted the code inside _trackTransactions in a separate function to be able to test it.

@gtupak gtupak requested a review from kquintal October 6, 2023 22:29
Base automatically changed from docs/migration-guide to main October 6, 2023 22:35
Copy link
Contributor

@kquintal kquintal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻 All for adding more tests + Nice Readme addition 🔥

@gtupak gtupak force-pushed the perf/request-chain-id branch from 2924a87 to 2c4bdfd Compare October 10, 2023 14:58
@gtupak gtupak merged commit a28379f into main Oct 10, 2023
@gtupak gtupak deleted the perf/request-chain-id branch October 10, 2023 15:01
@gtupak
Copy link
Collaborator Author

gtupak commented Oct 10, 2023

🎉 This PR is included in version 2.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants