vega-frontend-monorepo/specs/0002-WCON-connect_vega_wallet.md
Maciek 069b57d4ae
feat(wallet): 4370 new connect wallet modal (#4492)
Co-authored-by: asiaznik <artur@vegaprotocol.io>
2023-08-10 13:03:53 +02:00

6.1 KiB

Connect Vega wallet & select keys

Connect wallet

When looking to use Vega via a user interface e.g. Dapp (Decentralized web App), I...

  • If the app loads and already has a connection it can restore "eagerly" (without the user having to click connect) it could do so

  • must select a connection method / wallet type: (0002-WCON-002)

  • If I don't have the browser wallet installed, I see "get started" on the connect button, otherwise I see "Connect" there. (0002-WCON-002)

  • If I don't have the browser wallet installed, when I press "Get started" I can see immediately a way to get the Vega wallet browser extension. (0002-WCON-0010)

  • If I do have the browser wallet installed, I can easily choose to connect to it. (0002-WCON-0011)

  • If the desktop wallet or CLI is detected as running, I can see that and choose to connect with my desktop / CLI wallet. (0002-WCON-0012)

  • If there is not running desktop wallet or CLI detected, I can see that I need to open my wallet. (0002-WCON-0013)

  • I can find out more about supported browsers i.e. there is a link (Issue "List compatible browsers" vegawallet-browser#360 has to be implemented). (0002-WCON-0013)

  • I can find out more about the Vega Wallet and see what "other" versions there are i.e. there is a link to the page on the website (currently - https://vega.xyz/wallet#overview). (0002-WCON-0014)

  • Browser wallet:

    • The browser extension you need is automatically detected if you are using Chrome or Firefox, presenting the specific call to action to install that browser extension in a visible way e.g. with a Chrome or Firefox icon. (0002-WCON-041)
    • The browser extension store opens in a new tab on the Vega Wallet extension page (Chrome or Firefox). (0002-WCON-042)
    • When the browser I am using is not Firefox or Chrome, there is a way to download the browser extension anyway but at my own risk i.e. I can see options for both the chrome and firefox extensions in the CTA. (0002-WCON-043)
    • There is a way to understand the browser extension is an Alpha release e.g. there is a label / description. (0002-WCON-044)
  • if I choose Desktop/CLI App ("jsonRpc" type):

    • must have the option to input a non-default Wallet location (0002-WCON-003)

    • If I select to enter a custom wallet location, there is a way to go back to the default view i.e. a back button or similar.

    • must submit attempt to connect to wallet (0002-WCON-005)

    • if the dapp DOES already have a permission with the wallet: must see that wallet is connected (0002-WCON-007) note: if the user want to connect to a different wallet to the one that they were previously connected with, they will have to hit logout.

      • if the app uses one key at a time: should show what key is active (re-use the last active key) (0002-WCON-008)
    • if the wallet does NOT have an existing permission with the wallet: must prompt user to check wallet app to approve the request to connect wallet: See Connecting to Dapps for what should happen in wallet app (0002-WCON-009)

    • if new keys are given permission: must show the user the keys have been approved (0002-WCON-010)

    • if user rejects connection: must see a message saying that the request to connect was denied (0002-WCON-015)

    • if the dapp is unable to connect for technical reason (e.g. CORS): must see an explanation of the error, and a method of fixing the issue (0002-WCON-016)

... so I can use the interface to read data about my key/party or request my wallet to broadcast transactions to a Vega network.

Disconnect wallet

When wishing to disconnect my wallet, I...

... so that I can protect my wallet from malicious use or select a different wallet to connect to

Select and switch keys

when looking to do something with a specific key (or set of keys) from my wallet, I...

  • must see what key is currently selected (if any) (0002-WCON-025)

  • must see a list of keys that are approved from the connected wallet (0002-WCON-026)

  • for each key:

  • must see the option to trigger a re-authenticate so I can use newly created keys (0002-WCON-035)

...so that I can select the key(s) that I want to use.