Web: Bounty creation total sometime shows ETH instead of token

Created on 12 Apr 2019  Â·  36Comments  Â·  Source: gitcoinco/web

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

bug cannot reproduce

All 36 comments

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

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.

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?

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

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

OK, I will test more later.

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

Maybe the devil is in the details.

@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

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

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

OK, I got it.

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

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.

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

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:

  • PR by @Skyge

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

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

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)?

yeah, so it is really a little weird!

I don't have a screenshot or anything, but I did witness via screen-sharing
when I was helping some folks from the Hackathon post their bounties.
Basically, its just as described, you have a token selected, fields filled
in, etc. and then at the bottom it says ETH rather than the token.

On Sat, May 4, 2019 at 9:08 AM skyge notifications@github.com wrote:

yeah, so it is really a little weird!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gitcoinco/web/issues/4189#issuecomment-489274916, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAGUHEXGM3QLIZ3S5VWHWFTPTTHZVANCNFSM4HFRA6DQ
.

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

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

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

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.

@ceresstation Could you please show me a screenshot?

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

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.

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

@Skyge are you not able to reproduce still?

@ceresstation Yeap!

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

image

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

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

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

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__

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jasonrhaas picture jasonrhaas  Â·  4Comments

wizzfile picture wizzfile  Â·  3Comments

uluhonolulu picture uluhonolulu  Â·  3Comments

pelsasser picture pelsasser  Â·  4Comments

NukeManDan picture NukeManDan  Â·  3Comments