Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bounty creation total sometime shows ETH instead of token #4189

Closed
danlipert opened this issue Apr 12, 2019 · 36 comments · Fixed by #4647
Closed

Bounty creation total sometime shows ETH instead of token #4189

danlipert opened this issue Apr 12, 2019 · 36 comments · Fixed by #4647
Labels
bug This is something that isn't working as intended. cannot reproduce

Comments

@danlipert
Copy link
Contributor

Describe the bug
When creating a bounty, the total displayed at the bottom that shows the bounty funding plus the fee sometimes shows ETH instead of the token selected.

To Reproduce
I could not replicate, but seems to happen in brave browser

Expected behavior
Total should only show selected token (plus any ETH addons)

Desktop (please complete the following information):

Reportedly happens in Brave browser somewhat consistently

@PixelantDesign PixelantDesign added the bug This is something that isn't working as intended. label Apr 12, 2019
@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.3 ETH (49.28 USD @ $164.27/ETH) attached to it.

@gitcoinbot
Copy link
Member

gitcoinbot commented Apr 12, 2019

Issue Status: 1. Open 2. Cancelled


Work has been started.

These users each claimed they can complete the work by 9 months, 3 weeks from now.
Please review their action plans below:

1) skyge has started work.

I will try it in brave browser.

Learn more on the Gitcoin Issue Details page.

@Skyge
Copy link
Contributor

Skyge commented Apr 13, 2019

I have tested some times in brave browser, but it seems everything is in order, and it is also fine in chrome browser
This is in brave browser:
image

This is in chrome browser:
image

Maybe there is another situation, your network situation is not very good, maybe
not loaded, so could you please give me an screenshot about this?

@Skyge
Copy link
Contributor

Skyge commented Apr 15, 2019

I have searched in the code, we can find these details at the new_bounty.js

  $('select[name=denomination]').change(function(e) {
    const token = tokenAddressToDetails(e.target.value).name;

    $('#summary-bounty-token').html(token);
    $('#summary-fee-token').html(token);
    populateBountyTotal();
  });

const populateBountyTotal = () => {
  const bountyToken = $('#summary-bounty-token').html();

  if (isFeaturedBounty) {
    ...
  } else {
    total = `${totalBounty} ${bountyToken}`;
  }

so it seems like, if you make a change at Denomination, it will make the same change at Total.
So if you select a specific token, it will show the token name rather than ETH at the Total, at least I think so. Any idea? @thelostone-mc

@danlipert
Copy link
Contributor Author

@Skyge We've gotten a few users seeing this issue, although I haven't been able to reproduce, which is why its so challenging.

@Skyge
Copy link
Contributor

Skyge commented Apr 16, 2019

OK, I will test more later.

@Skyge
Copy link
Contributor

Skyge commented Apr 16, 2019

I am not sure, but there is a case would show ETH in the Total even though you select a token.
image
image

@Skyge
Copy link
Contributor

Skyge commented Apr 16, 2019

Maybe the devil is in the details.

@danlipert
Copy link
Contributor Author

@Skyge I was on a call with a bounty funder yesterday and saw via screen sharing this bug occur - the funder said this happens for them consistently 100% of the time, and they were using Chrome on Windows 10

@Skyge
Copy link
Contributor

Skyge commented Apr 17, 2019

Happening on Chrome on Windows 10? You're saying that this is happening on brave browser, so I always test on brave browser.

@danlipert
Copy link
Contributor Author

@Skyge Yes, the initial report was for Brave, but I received another report yesterday of the same issue and they were using Chrome on Windows 10.

@Skyge
Copy link
Contributor

Skyge commented Apr 17, 2019

OK, I got it.

@owocki
Copy link
Contributor

owocki commented Apr 17, 2019

Hey Kevin,

Bringing this back up, as I've found out how I can reproduce it. 

Yeah, it seems as though if the browser ( I use Chromium ) defaults to DAI as the option to pay, this bug is present.  In order to get rid of it, I have to change it to something else, then change it back for the UI to update accordingly. 

from the reporter

@Skyge
Copy link
Contributor

Skyge commented Apr 19, 2019

I really have tested by using Chrome on Windows 10.
image
image
So I want to confirm again, are our steps these:

  • Login https://gitcoin.co/ and then click Fund an issue to create a bounty
  • Fill in Fund Issue and select DAI at tag Denomination
  • Watch the Total the bounty funding fee should be calculated by DAI rather than ETH
    I think it works well, so what should I do? Asking the gitcoin team for advice? Or stopping this bounty, so anyone else can continue solving this problem?
    BTW, I think whoever describes the bug, it is better to take pictures to illustrate.

@thelostone-mc
Copy link
Member

checked it out in chrome on windows !
I couldn't reproduce it either 😓

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 0.3 ETH (47.94 USD @ $159.79/ETH) has been submitted by:

  1. @skyge

@owocki please take a look at the submitted work:


@owocki
Copy link
Contributor

owocki commented May 2, 2019

@Skyge the PR link you submitted doesnt point to anyting. do you have a fix ready?

@Skyge
Copy link
Contributor

Skyge commented May 3, 2019

@owocki @thelostone-mc As I described above, I have tested many times, but I can not reproduce it, so please provide a screenshot of this bug, cause I have no idea about this now.

@owocki
Copy link
Contributor

owocki commented May 3, 2019

i don't seem to be able to reproduce either. @danlipert mabye we can hook @Skyge up with some intel from the original reporter? (was it yorke from MSFT)?

@Skyge
Copy link
Contributor

Skyge commented May 4, 2019

yeah, so it is really a little weird!

@danlipert
Copy link
Contributor Author

danlipert commented May 8, 2019 via email

@Skyge
Copy link
Contributor

Skyge commented May 8, 2019

@danlipert OK, if this is a bug indeed, it must can be reproduced, so could you please test some times for me? cause I have tested many times and I can not reproduce it, so maybe there is something I ignore. thanks for any help!

@spm32
Copy link
Collaborator

spm32 commented May 16, 2019

@Skyge Could this in part be because DAI is the default currency in the form but ETH is the default currency on checkout 'total'? When I change the denomination of the bounty to anything else (or even back) it works fine because it triggers a change in the total section, but without doing a 'selection' action on the drop down this doesn't occur.

@Skyge
Copy link
Contributor

Skyge commented May 16, 2019

@ceresstation I think the default currency is always ETH no matter where you choose, so maybe only you change the denomination, you can use DAI, BTW, I find there is a new style page for Funds Issue, maybe it can make a difference.

@spm32
Copy link
Collaborator

spm32 commented May 17, 2019

Right but so in the dropdown menu DAI is the first option for me, despite the default currency at the bottom being ETH. Again, not sure if this is the root cause though.

@Skyge
Copy link
Contributor

Skyge commented May 18, 2019

@ceresstation Could you please show me a screenshot?

@spm32
Copy link
Collaborator

spm32 commented May 20, 2019

When DAI is selected on the dropdown (default when clicking into the funder form) this appears at the bottom of the screen: https://gyazo.com/677609cd7ed8b39c575f5fd8e82f8253

@Skyge
Copy link
Contributor

Skyge commented May 21, 2019

I think ETH is always the default currency, but it look like a little weird, cause some tokens are duplicate, like this:
image

Maybe this is another question.

@Skyge
Copy link
Contributor

Skyge commented May 22, 2019

@ceresstation Can we make a brief video discussion? you can contact me with this Email ([email protected])
to decide a suitable time.

@spm32
Copy link
Collaborator

spm32 commented May 31, 2019

@Skyge are you not able to reproduce still?

@Skyge
Copy link
Contributor

Skyge commented Jun 3, 2019

@ceresstation Yeap!

@spm32
Copy link
Collaborator

spm32 commented Jun 11, 2019

@Skyge

For me, all I need to do to cause this issue is:

  1. Click on Fund Issue
  2. Insert my GitHub URL
  3. Choose some amount of money (in DAI, which is the default value for me)
  4. Scroll to the bottom of the page to find something denominated in ETH instead

https://gyazo.com/bad199f095f37cced670c66cddd462ce

What does your step by step in trying to reproduce this issue look like? I'm pretty sure the major issue is that you are 'selecting' DAI whereas for me DAI is the default value in the form (but NOT in the final calculation at the bottom of the page).

@Skyge
Copy link
Contributor

Skyge commented Jun 11, 2019

image

@ceresstation
Yeah, we do almost the same steps, except my default currency is ETH, so this is the key point of this problem.

@phraktle
Copy link

phraktle commented Jun 13, 2019

The form seems to remember selections from a previous session. When the previous bounty was in a token, the dropdown defaults to that, however the total at the bottom indicates ETH. If change the denomination dropdown, the bottom total is refreshed correctly.

output

@Skyge
Copy link
Contributor

Skyge commented Jun 17, 2019

@phraktle Oh, I see, thanks for your help. Yeah, it seems like due to previous session. I will fix it ASAP.

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Cancelled


The funding of 0.3 ETH (79.43 USD @ $264.76/ETH) attached to this issue has been cancelled by the bounty submitter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is something that isn't working as intended. cannot reproduce
Projects
None yet
8 participants