-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: prevent silent failing during contract creation #59
Conversation
🦋 Changeset detectedLatest commit: 7865a62 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Makes a lot of sense! Do you have an idea where these "failures" are coming from? It's still happening even though everything is defined correctly, api is initialized, etc.? Maybe something like Also, is it happening in ink!athon for you (never really experienced it, but i most often have |
Ah forgot to mentioned how to reproduce a silent failure. It's just if you request a contractId which is not defined in the deployments. So only registered Would have been nice to add some testcases for tese cases to show how they are handled. I started yesterday on creating a pr for basic vitest setup, but seems we need to adapt the Provider a bit to be able to pass along own wallets to pass along a |
Merged 🔀 Will issue a new release by EOD :)
Happy to see this. Don't have much vitest experience on my own, though! |
Update: Had to revert to the previous behavior in Please make sure to always test PRs here with ink!athon (somehow assumed you did). You can find info about how to do this at the very bottom of the README (How to import a development version of this package locally?). |
While using the hooks I experience serveral times that my
contract
instance fromuseContract
oruseRegisteredContract
was plainlyundefined
.The creation of the contract or fetching the deployment information just failed silently. This PR is meant to make it more transparent to the user if this happens.