-
Notifications
You must be signed in to change notification settings - Fork 948
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
feat: Angular support for wallet-adapter #42
Conversation
CRA depends on Might worth taking a second look at it. I'm open to questions as needed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really clean, considering I find the Angular/Rxjs stuff absolutely brutal to look at :)
I just have few questions about how we can make sure the features are detectable in TypeScript so devs get compile time errors instead of pushing issues into runtime.
One way to get around this might be to use https://classic.yarnpkg.com/en/docs/selective-version-resolutions/ to force both to resolve to 8.2.x |
f9f1a6c
to
4a15034
Compare
If there is anything I can do to help get this merged in please let me know, would be happy to work with you @danmt to resolve anything. |
Right on @dubin-s. I'm currently working on my hackathon project so I haven't been able to wrap this one up. If you want to have early access check this out @danmt/wallet-adapter-angular, it's basically a fork I have for development purposes. I'm using it in a project and it's looking fine. It's literally the same thing you see in the PR plus some minor adjustments. You can give it a try and drop feedback here, I'd love an extra pair of eyes on it. |
Might be good to merge master in, and check the simplifying state changes that have been made to the |
I can do the sign-methods fix we talked about and the changes you mentioned. I've been using this for a little while and it's looking good, we can push it even if it's not ready to start gathering feedback. I can have this later today. |
Awesome, sounds good. Also, hit me up on Discord -- I'd be happy to take a look at your project if you like. |
I changed the sign-methods to be BTW - The only way I could bypass the I successfully built every package. It wasn't as easy as I wanted with Lerna but that should work. |
Once this gets merged and published, will update my example app and will raise another PR for that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Mostly I have a bunch of questions with a few small change requests.
38f71da
to
b5a4bf4
Compare
Yo @jordansexton, I decided to go the extra mile and made some refactoring so the package maps almost 1:1 with the react package. As you would expect, there are some places I couldn't do the exact same thing but I tried to keep the same behavior. Things to have in mind:
Things left to do:
Besides that, I re-ordered values and methods just like the React package for easier follow-up. I have an example app and it works like charm, I feel like once we fix the preflight stuff this is ready to go. I'll raise a PR for the example once this gets merged in. NOTE: Even though I feel comfortable with it, would love it if you can take a look at it just to make sure I didn't leave any weirdness behind. |
Going to take a look at this today @danmt. I see there have been lots of updates since I looked at this last. Was MIA over the weekend. |
Essentially it works the same way, I made adjustments so it was more similar to the react package. As well as adding a bunch of suggestions from @jordansexton. If you're familiar with the react package, this should be easy to follow, if it isn't feel free to drop a comment. |
Awesome, thanks @danmt. I'll try to review this today. |
* feat: initial commit * feat: it's alive!!
* chore: bump version * feat: set up error handler via config * chore: bump version * feat: make error handler optional * feat: prevent error flushing on send transaction * chore: bump version * refactor: deprecate the providers * feat: deprecate connection providers
* fix dependency resolution * fix lint warning * space * make error class declarations consistent with base package * adjust internal method names * use ReturnType for inference
Awesome work, thank you @danmt 🚀 |
Wohoo! 🎉 |
Overview
As an Angular dev there's no straightforward way of using this package without having to code everything from scratch. This PR intention is to give support for Angular devs trying to integrate
@solana/wallet-adapter
into their dapps.Features
In order to ensure this package is analogous to
@solana/wallet-adapter-react
a list of features is exposed below to make sure nothing is missed.NOTES
The state of the wallet and connection is handled by @ngrx/component-store which is the recommended tool, the component-store is very similar to the Providers in the React library. There are some
providers
that are similar to the Context from React, it just takes a Provider and makes it available for a component and its children.closes #37