-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Am I ever expected to import and use things like FreighterModule in my own app? It doesn't seem like it. I think this is just an implementation detail of StellarWalletsKit itself. If that's true, then I would love to see:
- Change the
modulesinitialization param to accept a list of strings. These can be the*_IDstrings that are currently used to setselectedWalletId. - Stop exporting all the
*Modules altogether, as they seem like an implementation detail that leaked. - Changed
allowAllModulesexported function to a simple string,allModules
This would also allow me to code my initialization logic with more clear "exclude" rules, such as:
import { allModules, ALBEDO_ID, StellarWalletsKit } from '@creit.tech/stellar-wallets-kit'
const kit = new StellarWalletsKit({
modules: allModules.filter(m => m !== ALBEDO_ID)
})So far, I have found it much more desirable to opt out of specific wallets, while benefiting from the full list of allModules supported by StellarWalletsKit.
Alternatively, in addition to the changes above, you could also add an excludeModules option.
Caveats
- If you expect app developers to actually use
*Modules in some way, you can still change the initialize parameters as described to make it easier and more expressive. - If you expect wallet plugin developers to use these modules, you can export them from a specific file or entrypoint, so you don't clutter the interface for your main audience, which is app developers.
- If this audience is still hypothetical, maybe don't clutter the interface for your main audience in service of them
Metadata
Metadata
Assignees
Labels
No labels