stellar / laboratory

82 stars 95 forks source link

Add the wallet kit to the top bar #922

Open jeesunikim opened 1 month ago

jeesunikim commented 1 month ago

This is needed for the CLI (#674) and it's common for web3 ux

Image

We are implement wallet kit at the top level which gives components access to the wallet kit so components could have access to the connecte wallet.

Design: @charles-sdf

States:

Source Account Options:

Does the Wallet Kit disconnect after a while and we need to check for the connection again? No the user explicitly disconnect the wallet.

Do we log out after X amount of time? No, the user is explicit when they disconnect.

How to handle a network change? If the network is changed and the wallet in question doesn't support a network change, the user will be logged out the wallet. If the wallet supports a network change say from testnet to mainnet, and a different network account on mainnet is is available on the logged in wallet then the new account associated to the network should now be displayed and available for us by Lab components.

This is the PR that previously integrates the wallet kit in a component but kit needs to be accessible to multiple components with Lab: https://github.com/stellar/laboratory/pull/852/files

sdfcharles commented 1 month ago

Wallet Kit Designs