Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve TransactionReceiptNotFoundError error catching in waitForTransaction #1833

Closed
holic opened this issue Oct 27, 2023 · 2 comments · Fixed by #3115
Closed

improve TransactionReceiptNotFoundError error catching in waitForTransaction #1833

holic opened this issue Oct 27, 2023 · 2 comments · Fixed by #3115
Labels
good first issue Good for newcomers

Comments

@holic
Copy link
Member

holic commented Oct 27, 2023

if (error instanceof TransactionReceiptNotFoundError) {

This check can fail if the project is using a different viem version from the MUD packages (see also #1832). For this particular check, we should consider other approaches (e.g. constructor name) that are more resilient to viem version misalignment.

@holic
Copy link
Member Author

holic commented Oct 27, 2023

Sounds like we should check error.name instead: https://viem.sh/docs/error-handling.html

@holic holic added the good first issue Good for newcomers label Sep 1, 2024
@holic
Copy link
Member Author

holic commented Sep 1, 2024

To workaround this, make sure your viem version is aligned with the viem version used by your MUD version. You can check your pnpm-lock.yaml and if you see different versions of viem in there, that's probably why you see this error.

CryptoSpaces added a commit to CryptoSpaces/mud that referenced this issue Sep 1, 2024
CryptoSpaces added a commit to CryptoSpaces/mud that referenced this issue Sep 1, 2024
CryptoSpaces added a commit to CryptoSpaces/mud that referenced this issue Sep 1, 2024
CryptoSpaces added a commit to CryptoSpaces/mud that referenced this issue Sep 1, 2024
CryptoSpaces added a commit to CryptoSpaces/mud that referenced this issue Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant