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

[WOC] PR@2764: Update corner case canceling started issue #2811

Merged
merged 5 commits into from
Jun 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions app/assets/v2/js/pages/kill_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,18 @@ window.onload = function() {

let errormsg = undefined;

if (bountyAmount == 0 || is_open == false) {
errormsg =
gettext('No active funded issue found at this address. Are you sure this is an active funded issue?');
}
if (fromAddress != web3.eth.coinbase) {
errormsg =
gettext('Only the address that submitted this funded issue may kill the bounty.');
if (bountyAmount > 0 && !is_open) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseInt(0.09, 10)>0 will be false
0.09 > 0 will be true (what we want)

errormsg = gettext(
'This bounty is already in progress, canceling the issue is no longer possible.'
);
} else if (bountyAmount == 0 || is_open == false) {
errormsg = gettext(
'No active funded issue found at this address. Are you sure this is an active funded issue?'
);
} else if (fromAddress != web3.eth.coinbase) {
errormsg = gettext(
'Only the address that submitted this funded issue may kill the bounty.'
);
}

if (errormsg) {
Expand Down