use-wallet icon indicating copy to clipboard operation
use-wallet copied to clipboard

Read-only connector?

Open bpierre opened this issue 4 years ago • 2 comments

Following @ajsantander suggestion, it might be interesting to provide a connector for non connected accounts, so that consumers could still benefit from the useWallet() utilities, even without using a wallet :smile:

It could be named something like account or address, but we should make it clear that it is not a normal connector (that connects to a wallet), and calling connect() wouldn’t do anything when using it.

I am also wondering if we should pass the account using the connector configuration, or if we should add the possibility to pass parameters to connect(name), and pass it after the connector name?

@Evalir @sohkai What do you think?

Edit: actually the connect() could work the same way, except it would always succeed and happen instantly.

bpierre avatar Sep 25 '20 14:09 bpierre

actually the connect() could work the same way, except it would always succeed and happen instantly.

Yes, agreed on this! I think it should work transparently like connecting to a real wallet, except that when you try to write transactions, we either log or throw an error.

However, thinking about this more, I wonder if what we actually want in terms of this is a "fake wallet" browser extension (ideally a feature integrated into actual wallets, but 🤷‍♂️). It's one you would either install during debugging (to impersonate other accounts) or if you were paranoid (e.g. wanted to sign everything offline).

sohkai avatar Sep 29 '20 12:09 sohkai

+1 had to do this manually with web 3 it was a pain

0xMeir avatar Nov 25 '20 00:11 0xMeir