openethereum / fether

Decentralized and light Ethereum Wallet
BSD 3-Clause "New" or "Revised" License
124 stars 33 forks source link

[UX] Show the amount in $ on account overview and Tx sending screens #161

Open Tbaut opened 6 years ago

Tbaut commented 6 years ago

Nobody knows how much 0.001Eth is worth.

Rakhisharma commented 6 years ago

@Tbaut Do you have any design on where exactly we want to show how much 0.001Eth is worth on account overview page? Also, anyone working on this issue? I would love to take this issue. Let me know. thanks!

Tbaut commented 6 years ago

@Rakhisharma, thanks for proposing your help, no one is working on the issue yet. I would show the amount in $ like this (suggestion): Account screen:

Tx screen:

ps: I don't really like the proposal for the Tx amount, happy to see other suggestions.

Rakhisharma commented 6 years ago

Thanks for the details @Tbaut. I am assuming by Ty you mean typed amount. I agree with you but generally, when we send some amount to other account normally we think of how much ETH I need to send. But again when we calculate total amount in dollar for user, it make user experience more rich!

I was going through the codebase, I was able to successfully setup and run the Fether on my local. one question-

Tbaut commented 6 years ago

I am assuming by Ty you mean typed amount

yes, typo, I meant "Tx" amount.

I'll just copy/paste what I wrote in the chat: When launching yarn start as explained in the readme you have the ability to see the changes directly (ignore the browser tab that is open and concentrate on the electron window). Development tools are available just like in a browser when doing Ctrl-shift-i on the Electron window.

Tbaut commented 6 years ago

@axelchalon, any other tool that is worth mentioning?

axelchalon commented 6 years ago

nothing else that comes to mind!

Rakhisharma commented 6 years ago

@Tbaut thanks for the reply- I think I have made some progress, most probably I will commit my WIP. Right now I am stuck at one point- how to get the values of ETH and US dollar here as it changes every time? Do we want to use any API to get the updated values every time? Or we already have this in our code base? if yes, please point me out to the relevant code. Thanks :)

Tbaut commented 6 years ago

We have such kind of APIs in the node, I don't think we have it in the shell though (couldn't find it). It's here: https://github.com/paritytech/parity-ethereum/blob/98b7c07171cd320f32877dfa5aa528f585dc9a72/price-info/src/lib.rs#L96

Refreshing the price can be done every 30sec I'd say. cc @axelchalon

Rakhisharma commented 6 years ago

Hi @Tbaut, I have pushed a WIP- I am not raising a PR as still few things needs to be done. Like I am still waiting for @axelchalon comment(I still don't have any idea about how I can use the link that you gave in implementation of getting updated USD value. ) I understand the refreshing part though!

Here is the link to WIP.

Tbaut commented 6 years ago

@amaurymartiny might also have an opinion :)

amaury1093 commented 6 years ago

Thanks @Rakhisharma for your commits.

The link @Tbaut provided is just saying that you can use Etherscan's API to fetch the ETH<->USD price, documentation is here: https://etherscan.io/apis#stats. So an idea would be to ping every 30s that endpoint and retrieve the conversion rate.

@Rakhisharma feel free to create a PR as early as possible, even in WIP state. It'll be much easier to review & comment your current progress, and we can put a "In progress" label so that it doesn't get merged before it's ready.

Rakhisharma commented 6 years ago

@amaurymartiny thank you for the reply. I have created a PR in WIP state. I will take a look into the documentation.

Tbaut commented 5 years ago

One of the most decentralized way of getting the USD/ETH price is by using the price feed from Maker also see an interesting discussion about it on reddit

ltfschoen commented 5 years ago

@Tbaut @Rakhisharma Is anyone still working on this? Is this the latest WIP branch? https://github.com/paritytech/fether/commit/8697c9453a92c86141a858224e4b10ee5de63e52

Alternatively use BlockScout API and do request for Account > getprice https://blockscout.com/eth/kovan/api_docs

Tbaut commented 5 years ago

Nobody is working on it but since this is a critical piece (where users can be tricked), it needs to be truly decentralized, or not to be. Relying on 1 API, even open source, is not enough.