anza-xyz / anza-xyz/kit-plugins
Wallet plugin: migrate to key by `Wallet` instead of name
- Ngôn ngữ chính
- TypeScript
- Star
- 20
- Fork
- 14
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 54
Mô tả
Currently the wallet plugin is keyed in all its internal stores by wallet name, and will behave weirdly if you end up with two wallets with the same name registered.
We could instead key most of the internal stores by `Wallet`, which stays stable (unlike `UiWallet` and some other identifiers) and will be reliably unique.
The only place where we would probably still use name is where we store a connection (eg in `localStorage`). But in this case we could fetch all wallets with the matching name, and select the one that has the given account authorized. If there are multiple of those then it's fine to just connect to one arbitrarily.
Low priority because it's not a common case, but would add a bit of resilience. Should be an internals-only change.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.