ethersphere / swarm-desktop

Electron Desktop app that helps you easily spin up and manage Swarm node
https://desktop.ethswarm.org/
BSD 3-Clause "New" or "Revised" License
26 stars 13 forks source link

Add WalletConnect option to `bee-desktop` #110

Open chrishobcroft opened 2 years ago

chrishobcroft commented 2 years ago

Currently, it would seem that bee-desktop generates its own keypair when it loads up.

This issue is to propose that as well as this default option, there is an option for a user to connect their existing keypair using WalletConnect. This would allow a user to interact at a deeper level, by signing all transactions themselves through their smartphone, instead of it happening automatically and opaquely in the background.

Proposed user journey:

  1. Open bee-desktop
  2. Go to Account / Wallet
  3. Select "Connect WalletConnect" (a new option)
  4. Scan QR code
  5. Give bee-desktop permission to connect to your wallet

Then, when performing actions which require a signature, this comes as a notification on the user's phone, allowing the user to be fully in control.

Here's how the Account / Wallet page looks right now: image

Also, it might obsolete this view, as the WalletConnect link comes with it's own RPC endpoint: image

agazso commented 2 years ago

This is a good point. There are two major reasons that we didn't implement it this way so far:

  1. The Bee node may do quite a few transactions in the background during upload (doing swap transactions for the chequebook). It would be a hassle if you always need to sign them interactively. Please note that the Bee node may be even active in the background when the web UI is not visible..
  2. We wanted to avoid a situation when people are using a wallet with significant amount of other currency in it for running their nodes. Also because of the 1. point (interactivity, or the lack of it) we didn't want to integrate with a user facing wallet. There is integration with clef, but the UX of it does not seem to be great with using a lot of resources at the same time, so we are not very enthusiastic about it so far.

In summary, this is still considered an area of research what could be a good solution. Improving the onboarding experience regarding the RPC endpoint could have a huge impact.

chrishobcroft commented 2 years ago

There is even a great opportunity to include it at this step:

Screenshot from 2022-07-06 23-47-59

as an alternative to this:

Screenshot from 2022-07-06 23-48-03

chrishobcroft commented 2 years ago

The Bee node may do quite a few transactions in the background during upload (doing swap transactions for the chequebook). It would be a hassle if you always need to sign them interactively. Please note that the Bee node may be even active in the background when the web UI is not visible..

I think that's fine. In some ways it feels like a nice way to connect a user to their Bee Node, if their phone is bzzzzing in their pocket during setup.

We wanted to avoid a situation when people are using a wallet with significant amount of other currency in it for running their nodes. Also because of the 1. point (interactivity, or the lack of it) we didn't want to integrate with a user facing wallet. There is integration with clef, but the UX of it does not seem to be great with using a lot of resources at the same time, so we are not very enthusiastic about it so far.

WalletConnect enables new paradigms in UX, IMHO. They also just launched cloud to make it easier for developers to include their service in their applications. I guess it's centralised, but also you can run your own infrastructure if you want.

In summary, this is still considered an area of research what could be a good solution. Improving the onboarding experience regarding the RPC endpoint could have a huge impact.

It's a good point. For testing purposes, the only WalletConnect-enabled browser that works on Gnosis Chain (as far as I'm aware) is https://github.com/walleth/walleth/ on Android by @mr_ligi which is a powerful and open (libre) app with multiple wallet types and multiple configurable RPC endpoints. It's really great, and also good for testing.

StEvUgnIn commented 1 year ago
  1. We wanted to avoid a situation when people are using a wallet with significant amount of other currency in it for running their nodes.

Do you agree that Swarm-Desktop is a custodial wallet-based solution in its current state? You should provide at least an integration to metamask. There is no reason that someone would stake much on another L2 network (speaking of xDAI). This even refrains me from wanting to use Swarm-Desktop because I love freedom.