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

tip/kudos receive fixes #2728

Merged
merged 2 commits into from
Nov 8, 2018
Merged

tip/kudos receive fixes #2728

merged 2 commits into from
Nov 8, 2018

Conversation

owocki
Copy link
Contributor

@owocki owocki commented Nov 7, 2018

Description

We had a user who accidently redeemed their ETH to the wrong address. In order to prevent user error in this vein in the future, we want to:

  1. don't overwrite an address that was inserted into hte form before domready.
  2. ask the user to confirm their forward address after they press 'redeem', but before the tx is sent to the blockchain
Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Affected core subsystem(s)

tip/kudos

Testing

tested it

Refers/Fixes

email bug report

@@ -35,7 +35,9 @@ window.onload = function() {
if (document.web3network != document.network) {
_alert({ message: gettext('You are not on the right web3 network. Please switch to ') + document.network }, 'error');
} else {
$('#forwarding_address').val(web3.eth.coinbase);
if(!$('#forwarding_address').val()){

Choose a reason for hiding this comment

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

Expected space(s) after "if". (keyword-spacing)
Unexpected if as the only statement in an else block. (no-lonely-if)
Missing space before opening brace. (space-before-blocks)

@@ -73,6 +75,11 @@ $(document).ready(function() {
return;
}

if(!confirm(gettext('Please confirm that ' + forwarding_address + ' is the address for which you wish to redeem this tip.'))){

Choose a reason for hiding this comment

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

Expected space(s) after "if". (keyword-spacing)
Missing space before opening brace. (space-before-blocks)

@@ -45,7 +45,9 @@ window.onload = function() {
if (document.web3network != document.network) {
_alert({ message: gettext('You are not on the right web3 network. Please switch to ') + document.network }, 'error');
} else {
$('#forwarding_address').val(web3.eth.coinbase);
if(!$('#forwarding_address').val()){

Choose a reason for hiding this comment

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

Expected space(s) after "if". (keyword-spacing)
Unexpected if as the only statement in an else block. (no-lonely-if)
Missing space before opening brace. (space-before-blocks)

@@ -82,6 +84,10 @@ $(document).ready(function() {
unloading_button($(this));
return;
}
if(!confirm(gettext('Please confirm that ' + forwarding_address + ' is the address for which you wish to redeem this tip.'))){

Choose a reason for hiding this comment

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

Expected space(s) after "if". (keyword-spacing)
Missing space before opening brace. (space-before-blocks)

@codecov
Copy link

codecov bot commented Nov 7, 2018

Codecov Report

Merging #2728 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2728   +/-   ##
=======================================
  Coverage   29.91%   29.91%           
=======================================
  Files         163      163           
  Lines       13062    13062           
  Branches     1747     1747           
=======================================
  Hits         3908     3908           
  Misses       9030     9030           
  Partials      124      124

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0206f03...1ca34a5. Read the comment docs.

@owocki owocki merged commit 45154f8 into master Nov 8, 2018
@thelostone-mc thelostone-mc deleted the kevin/confirm_before_redeem branch December 28, 2018 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants