-
Notifications
You must be signed in to change notification settings - Fork 86
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
Update type signature of RpcProviderModule
to implement Web3's AbstractProvider
#83
Comments
This issue still exists in the latest version. The workaround is still applicable but it would be nice to see this completely fixed in future releases. |
We are open to a community PR @sebastiandine! |
* (feat): Added 'web3-core' package v1.5.2 to import the new AbstractProvider Type * (feat): fix #83 * First step to refactoring 'PayloadTransport' into 'ViewController' * Fix remaining tests * Update 'peerDependencies' for @magic-sdk/commons * Fix clean script Co-authored-by: Adenekan Wonderful <[email protected]>
* (feat): Added 'web3-core' package v1.5.2 to import the new AbstractProvider Type * (feat): fix #83 * First step to refactoring 'PayloadTransport' into 'ViewController' * Fix remaining tests * Update 'peerDependencies' for @magic-sdk/commons * Fix clean script Co-authored-by: Adenekan Wonderful <[email protected]>
* Re-factor scripts for building, development, linting, and cleaning to TypeScript * Remove remnants of old test runner (ava) * Re-factor scripts for unit testing to TypeScript * Small cleanups * Refactor to merge `ViewController` and `PayloadTransport` classes (#203) * (feat): Added 'web3-core' package v1.5.2 to import the new AbstractProvider Type * (feat): fix #83 * First step to refactoring 'PayloadTransport' into 'ViewController' * Fix remaining tests * Update 'peerDependencies' for @magic-sdk/commons * Fix clean script Co-authored-by: Adenekan Wonderful <[email protected]> * Make script code more DRY * Update TypeScript & make scripts more DRY * Fix typo and add 'printSeparator' script utility * Fix 'inject-env.ts' script following re-organization of code * Remove outdated / unused dependencies from root PackageJSON * Progress towards integrating microbundle * Update build scripts to bundle all packages via microbundle * Remove unnecessary console statement * Run pre-commit hooks against all packages * Add more memory for tasks spawned via 'wsrun' * Raise the resource class in CI * Try to fix ENOMEM errors in CI by limiting concurrency * Replace 'p-limit' dependency with prior version (new version is ESM-only) * Better caching in CircleCI * Update test script to work with Yarn 2 * Fix tests related to ViewController refactor * Reduce the CircleCI resource class back to medium * Fix tests related to ViewController refactor Co-authored-by: Adenekan Wonderful <[email protected]>
* Re-factor build scripts to TypeScript (#202) * Re-factor scripts for building, development, linting, and cleaning to TypeScript * Remove remnants of old test runner (ava) * Re-factor scripts for unit testing to TypeScript * Small cleanups * Refactor to merge `ViewController` and `PayloadTransport` classes (#203) * (feat): Added 'web3-core' package v1.5.2 to import the new AbstractProvider Type * (feat): fix #83 * First step to refactoring 'PayloadTransport' into 'ViewController' * Fix remaining tests * Update 'peerDependencies' for @magic-sdk/commons * Fix clean script Co-authored-by: Adenekan Wonderful <[email protected]> * Make script code more DRY * Update TypeScript & make scripts more DRY * Fix typo and add 'printSeparator' script utility * Fix 'inject-env.ts' script following re-organization of code * Remove outdated / unused dependencies from root PackageJSON * Progress towards integrating microbundle * Update build scripts to bundle all packages via microbundle * Remove unnecessary console statement * Run pre-commit hooks against all packages * Add more memory for tasks spawned via 'wsrun' * Raise the resource class in CI * Try to fix ENOMEM errors in CI by limiting concurrency * Replace 'p-limit' dependency with prior version (new version is ESM-only) * Better caching in CircleCI * Update test script to work with Yarn 2 * Fix tests related to ViewController refactor * Reduce the CircleCI resource class back to medium * Fix tests related to ViewController refactor Co-authored-by: Adenekan Wonderful <[email protected]> * Fix ENV variable interpolations * Force publish * Remove temporary change (#205) * Add '--force-publish' flag to 'lerna version' command * Apply forcePublish to 'auto' * Log environment in one place during build * Trigger publish on 'magic-sdk' and '@magic-sdk/react-native' * Remove comments used to trigger prerelease * Fix SemVer issues * Ignore 'semver' wrapper from test coverage * Target 'web' Co-authored-by: Adenekan Wonderful <[email protected]>
🚀 Issue was released in |
2 similar comments
🚀 Issue was released in |
🚀 Issue was released in |
✅ Prerequisites
magic-sdk
)?✨ Feature Request
Currently, to use Web3 features in TypeScript, the
magic.rpcProvider
member must be cast toany
, like this:But, now that web3/web3.js#3380 is resolved, we can implement the Web3
AbstractProvider
interface to gain strong typing. Once this is implemented, consumers ofrpcProvider
can simply do this:The text was updated successfully, but these errors were encountered: