gitcoinco / web

Grow Open Source
https://gitcoin.co
Other
1.78k stars 771 forks source link

show conv rate rate at time of posting #165

Closed owocki closed 6 years ago

owocki commented 6 years ago

What

In github notifications Instead of

This issue now has a funding of 0.3 ETH (201.0 USD) attached to it.

we should say something like

This issue now has a funding of 0.3 ETH (201.0 USD @ $700/ETH) attached to it

Requirements

Places to update:

gitcoinbot commented 6 years ago

This issue now has a funding of 0.04 ETH (44.47 USD) attached to it.

tansaku commented 6 years ago

@owocki any pointers as to where in the codebase changes would be required to implement this? My guess is here: https://github.com/gitcoinco/web/blob/master/app/dashboard/notifications.py#L219

owocki commented 6 years ago

@tansaku you could use the convert_amount() function in economy/utils

bhenze commented 6 years ago

Seems straight forward. I can start digging into it now.

gitcoinbot commented 6 years ago

Work has been started on the 0.04 ETH (41.48 USD) funding by:

  1. @bhenze

    Please work together and coordinate delivery of the issue scope. Gitcoin doesn't know enough about everyones skillsets / free time to say who should work on what, but we trust that the community is smart and well-intentioned enough to work together. As a general rule; if you start work first, youll be at the top of the above list ^^, and should have 'dibs' as long as you follow through.

    On the above list? Please leave a comment to let the funder (@owocki) and the other parties involved what you're working, with respect to this issue and your plans to resolve it. If you don't leave a comment, the funder may expire your submission at their discretion.

bhenze commented 6 years ago

I have everything except for the email. I was thinking about exposing a member in the Bounty object to return the USDT value of ETH. Does this sound reasonable?

bhenze commented 6 years ago

@owocki I am having difficulties setting up the database and am unable to test my changes. Do you happen to have an easy way I can test my updates?

owocki commented 6 years ago

@owocki I am having difficulties setting up the database and am unable to test my changes. Do you happen to have an easy way I can test my updates?

docker is pretty easy way to go.. if you post in slack and tag myself or @mbeacom if you have any issues.. that could work.

if the changes are small enough, you could maybe test them via the command line.

I have everything except for the email. I was thinking about exposing a member in the Bounty object to return the USDT value of ETH. Does this sound reasonable?

this exists already. its called value_in_usdt

bhenze commented 6 years ago

@owocki I was able to get docker to work and am able to test the page itself but having problems getting data to stick. I tried setting up a local database but to no avail. The changes are fairly small and can test some through the command line.

Also,

value_in_usdt exists but eth_value_in_usdt for 1 ether does not exist. This is more or less what I was trying to test on the bounty details page and emails.

mbeacom commented 6 years ago

@bhenze The docker-compose stack provisions a postgresql instance for you. You can view the data in your database by browsing to: http://localhost:8081 which is running pgweb. Or you can access via psql cli with: psql -h localhost -U postgres - If you don't have psql, you can install it on mac via brew install postgresql

bhenze commented 6 years ago

@mbeacom thanks for your help! I am new to psql so I have been messing with it a bit. Ended up going down quite the rabbit hole but I am back on track now. My test environment is up and running.

amites commented 6 years ago

so what's going on with this one?

I see the MR has fresh comments

bhenze commented 6 years ago

Just responding to the comments now.

bhenze commented 6 years ago

Sorry, if you are asking for specifics. I am trying to figure out what the preferred format for the message should be:

"($201.0 @ 700 USD/ETH)"
... or ...
"($201.0 @ $700/ETH)"
depending on the answer to my question above
gitcoinbot commented 6 years ago

This issue now has a funding of 0.04 ETH (37.11 USD) attached to it.

scottydelta commented 6 years ago

If we use shields.io, we can show live price as well as value in realtime.

eg: 0.04 ETH @ Bounty

We will need to implement an endpoint which will return the price as well as value to be shown and it is displayed live like a badge. Right now I have a simple endpoint running on my local system to provide price for demo purpose which uses coinbase's API to get spot price of ETH.

The API call which is showing the above badge: https://img.shields.io/badge/dynamic/json.svg?uri=https://api.coinbase.com/v2/prices/ETH-USD/spot&query=$.data.amount&prefix=$&label=ETH&colorB=4d4d4d&colorA=4d4d4d&style=flat-square&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjUwMCA1MDAgMjAwMCAyMDAwIj48cGF0aCBmaWxsPSIjRkZGIiBkPSJNMTUwMCA1MDBMODg2LjEgMTUxOC42bDYxMy45LTI3OS4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNTAwIDEyMzkuNWwtNjEzLjkgMjc5LjEgNjEzLjkgMzYyLjh6TTIxMTMuOSAxNTE4LjZMMTUwMCA1MDB2NzM5LjV6Ii8%2bPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTE1MDAgMTg4MS40bDYxMy45LTM2Mi44LTYxMy45LTI3OS4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04ODYuMSAxNjM0LjlMMTUwMCAyNTAwdi01MDIuM3oiLz48cGF0aCBmaWxsPSIjRkZGIiBkPSJNMTQ5OS45IDE5OTcuN1YyNTAwbDYxNC4yLTg2NS4xeiIvPjwvc3ZnPg==

check this out @owocki

EDIT: replaced price URI from my personal domain to coinbase which only provides price and not the value of required ETH in USD and edited accordingly.

gitcoinbot commented 6 years ago

Work has been started on the 0.04 ETH (37.38 USD) funding by:

  1. @bhenze

    Please work together and coordinate delivery of the issue scope. Gitcoin doesn't know enough about everyones skillsets / free time to say who should work on what, but we trust that the community is smart and well-intentioned enough to work together. As a general rule; if you start work first, youll be at the top of the above list ^^, and should have 'dibs' as long as you follow through.

    On the above list? Please leave a comment to let the funder (@owocki) and the other parties involved what you're working, with respect to this issue and your plans to resolve it. If you don't leave a comment, the funder may expire your submission at their discretion.

gitcoinbot commented 6 years ago

This issue now has a funding of 0.04 ETH (37.62 USD) attached to it.

scottydelta commented 6 years ago

I agree to @tra38's point. People who don't deal in ETH have no idea how big or small a bounty is when only given in terms of ETH. Showing the $ value might be something which will attract more users to take up the tasks for the bounties.

scottydelta commented 6 years ago

I like @lazaridiscom's suggestion here at issue #460, we can finally just have:

This issue now has a funding of Bounty - More information at: Gitcoin

And there is definite need to limit the number of messages a bot can add to an issue(this thread is a good example), since we are going for a single line message, can we just have only one Gitcoin Bot message per issue and new messages gets appended to the old one like a log?

EDIT: replaced price URI from my personal domain to coinbase which only provides price and not the value of required ETH in USD and edited accordingly.

gitcoinbot commented 6 years ago

Work has been started on the 0.04 ETH (37.4 USD) funding by:

  1. @scottydelta

    Please work together and coordinate delivery of the issue scope. Gitcoin doesn't know enough about everyones skillsets / free time to say who should work on what, but we trust that the community is smart and well-intentioned enough to work together. As a general rule; if you start work first, youll be at the top of the above list ^^, and should have 'dibs' as long as you follow through.

    On the above list? Please leave a comment to let the funder (@owocki) and the other parties involved what you're working, with respect to this issue and your plans to resolve it. If you don't leave a comment, the funder may expire your submission at their discretion.

bhenze commented 6 years ago

So what is the plan for this issue then? Do we want to update the story to reflect the proper verboseness?

bhenze commented 6 years ago

Sounds good! thanks for the input.

mbeacom commented 6 years ago

@bhenze @lazaridiscom Glad to have you both here and actively engaged! If you're ever uncertain about whether or not to proceed with working on something, feel free to reach out to us / request evaluation of your proposed idea. We'd be more than happy to work through it with you. When in doubt, feel free to reach out. We encourage community feedback and contributions!

For this particular issue, I think it's safe to proceed with the scoped out change provided by @owocki. As for the newly proposed changes, we think that’s a good idea to have a dynamic banner. Right now, we aren’t sure how to implement the changes quite yet. Let’s discuss that issue separately on the Github thread and bounty once we agree on the approach. Sound good?

bhenze commented 6 years ago

@mbeacom happy to help where I can! And yeah, that sounds great.

owocki commented 6 years ago

looks like gitcoin bot is going haywire. sorry everyone. planning on triaging today / tomorrow

owocki commented 6 years ago

just put in a fix ( https://github.com/gitcoinco/web/commit/12c88376b8b0948d645839f432183441a8ddaca8 ) . deleting the erroneous comment right now

vs77bb commented 6 years ago

@bhenze @scottydelta Poking in here, who is working this one right now? It seems like this might be in need of feedback from @owocki but I can't tell for sure.

Apologies for Gitcoin Bot coming in and trying to take over 😛 (Which I can see is a topic of conversation itself).

@owocki @PixelantDesign Any thoughts to add on the approach suggestions?

bhenze commented 6 years ago

Yeah, this one kinda got a little confusing. I have changes #387 but there is a bit of drift now and I will need to do some manual merging. Just wanted to wait till I had the go-ahead before I did that.

owocki commented 6 years ago

id be happy to move over to a clean thread if that'd help make this neater :)

@bhenze let me know if you need anything from me! lets we left things i think we were on the same page

scottydelta commented 6 years ago

are we still adding live rates using shields.io API?

@bhenze if the answer is yes to the above question then I can work on adding that if you haven't worked on it already. thanks

owocki commented 6 years ago

id prefer to complete the original scope here and then consider adding that later..

bhenze commented 6 years ago

@owocki yup, we are on the same page. I was just waiting for a review on #387 but while I was waiting, some of those strings got updated a bit. So I just need to go back, rebase and fix those strings. I will go ahead and do that in a few and let you know when it is ready to look at.

bhenze commented 6 years ago

@owocki, okay. My branch is up to date with all my updates from previous reviews and all the latest code from master. Cheers!

owocki commented 6 years ago

commenting over at https://github.com/gitcoinco/web/pull/387 now

bhenze commented 6 years ago

@owocki responded to your questions.

owocki commented 6 years ago

😍

@bhenze send me your ETH address and ill pay you out the bounty

bhenze commented 6 years ago

@owocki 0x0370feF36074ccd141fb3BfFee17824021dc0417

Thanks! Look forward to helping out in the future.

owocki commented 6 years ago

here ya go @bhenze -- thanks again! http://etherscan.io/tx/0x7c23844fb3eb7d58eb17411ece2364679e53310831c5ff135edd3eea68096e19