-
Notifications
You must be signed in to change notification settings - Fork 37
feat: adding hubProvider to wallets-adapter #1275
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
Conversation
a27f00f to
7741440
Compare
arlert-armin
left a comment
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.
Before this PR, every new hub wallet action was defined in both the hub adapter and legacy provider, and selected via useProviders, prioritizing the hub implementation.
Now you're using an action directly from hubProvider for XRPL wallets, which makes sense since there's no legacy implementation. However, this introduces inconsistency with how other actions are handled.
Your approach will be valid once all wallets are migrated to hub, but for now, let's stick with the existing pattern to maintain consistency. Please consider adding a TODO above swapQueueContext to clean up legacy actions after full migration.
As we've talked, the goal here is to be able to directly call an action for a specific namespaces. my use case is for ripple blockchain and there is no legacy wallets for that blockchain. so it never throw an error. Another point is on the usage side, when you are using |
arlert-armin
left a comment
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.
LGTM
RyukTheCoder
left a comment
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.
LGTM
7741440 to
3192e81
Compare
Summary
Hub has a dynamic interface through its actions concept, but the the legacy only have a limited and fixed limit.
In this PR, we can have access to hub provider to run any actions. Legacy will goes through an error. so this method only works on hub wallets.
You can see the usage on #1276
Part of #1096
Fixes RF-2294
How did you test this change?
No need to test.
Checklist: