fether icon indicating copy to clipboard operation
fether copied to clipboard

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

Open adamryczkowski opened this issue 6 years ago • 6 comments

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...

adamryczkowski avatar Jul 20 '19 11:07 adamryczkowski

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

Tbaut avatar Jul 20 '19 12:07 Tbaut

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. :)

adamryczkowski avatar Jul 20 '19 18:07 adamryczkowski

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.

axelchalon avatar Jul 22 '19 15:07 axelchalon

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.

adamryczkowski avatar Jul 22 '19 16:07 adamryczkowski

(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!

axelchalon avatar Jul 22 '19 17:07 axelchalon

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

jakeols avatar Nov 08 '19 20:11 jakeols