Open wjthieme opened 7 months ago
@steveluscher thanks for the feedback!
The only other meta piece of feedback I have to offer (without actually having inspected the situation too closely) is that there's a lot of ! assertions everywhere. The target number of ! assertions, on the internet, should be zero. I have to believe that there's either something we can do to eliminate those, or worse that the presence of those is burying a bug.
Not really sure why I added all the ! assertions since they're not even doing anything (type-wise) seeing that Array[number] doesn't return x | undefined
but just x
. Anyway with interleaving they can be removed either way
This is an example implementation of an
Adapter
wrapper that conforms toWallet
. This allows registering anyAdapter
from@solana/wallet-adapter-wallets
in a@wallet-standard/base
Wallet
.This is potentially useful in the following scenarios:
@solana/wallet-adapter-react
to@wallet-standard/<>
packages since there is no dependency on adapters to upgrade their code.@wallet-standard
by just registering the adapter wrapper on demand (for example right before the user wants to connect). The implementation for this would need to provide name + icon since they are then no longer available from the wrapper (since it is not loaded yet).This PR merely serves as an example. There at least a few kinks that need to be worked out as well as some testing before there can be any talk about proceeding with this.
cc @jordaaash @steveluscher