Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Defer input of a private key when adding account just to view the balance #532

Open
adamryczkowski opened this issue Jul 20, 2019 · 6 comments

Comments

@adamryczkowski
Copy link

Use case: I want to use the Fether just to view the balance.

If there is already a way to use Fether to monitor the balance, then please point me to the relevant part of the documentation and close the issue.

You may implement it by allowing two types of accounts: authorized (i.e. with private keys) and non-authorized. I hope it will not require too much refactoring...

@Tbaut
Copy link
Collaborator

Tbaut commented Jul 20, 2019

Thanks for the issue. There's indeed no easy / non-hacky way to achieve this for now.

@adamryczkowski
Copy link
Author

adamryczkowski commented Jul 20, 2019

I would suggest considering addnig some sort of priority on this feature request: Your project is unique in that it ostensibly does not depend on any backing server and your users are those that are careful with whom they entrust their private keys. Asking for private keys upfront in Fether make us feel uneasy. :)

@axelchalon
Copy link
Contributor

axelchalon commented Jul 22, 2019

Good point. If you import an account from Parity Signer, then Fether doesn't ask for the private key, as it is managed by Parity Signer. If managing the account with Parity Signer is out of the question for you (e.g. private key stored elsewhere, or you want to monitor an account you don't have access to), there is still a workaround: you can generate the QR code of the address and scan it in + => Recover from Parity Signer: Scan From QR Code just the same. The QR code must encode the following content: ethereum:0x[ADDRESS]@[CHAIN_ID].

As an example, if you want to monitor 0x8CCF9C4a7674D5784831b5E1237d9eC9Dddf9d7F on the mainnet (chainid 1), then the QR code content should be ethereum:0x8CCF9C4a7674D5784831b5E1237d9eC9Dddf9d7F@1. Generate it (e.g. https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=ethereum:0x8CCF9C4a7674D5784831b5E1237d9eC9Dddf9d7F@1&choe=UTF-8) and display it on your phone. On Fether, click the + and then Recover from Parity Signer: Scan From QR Code. Scan the QR code, give the account a name, and voilà, it shows up in the list and you can monitor it.

@adamryczkowski
Copy link
Author

Thank you. Is there a possibility of using this walkaround on a notebook that does not have a camera?

I can install a virtual camera, but that seems too much hassle.

In theory, once you already have a QR reader embedded in the code, it might be relatively easy to give an option to type the encoded text manually. Just like a when you checkout in the shop, there is an option to enter the digits encoded in the barcode using the numerical keyboard.

@axelchalon
Copy link
Contributor

(hacky workaround)

You can open the Electron/Chromium Developer Tools (Ctrl+shift+I) inside Fether, navigate to the Console tab, paste the following line (replace address and name as desired) and hit enter: localStorage['localforage/__paritylight::paritySignerAccounts'] = JSON.stringify(JSON.parse(localStorage['localforage/__paritylight::paritySignerAccounts'] || '[]').concat({address: "0x8CCF9C4a7674D5784831b5E1237d9eC9Dddf9d7F", chainId:1, name: "Monitored account"})); location.reload();

Yes, I agree it would be pretty easy to add the option to import an address. If anyone feels like implementing this, feel free to submit a PR!

@jakeols
Copy link
Contributor

jakeols commented Nov 8, 2019

Hey @adamryczkowski, I've been working a little bit on implementing this in my branch here. It's pretty easy to call handleSignerImported with your given address, which achieves the same result as the hacky-workaround above. Here's a gif of what it looks like at the moment. Still need to test / clean up some things.
fether-full

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants