Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Phishing address warning #1674

Merged
merged 8 commits into from
Mar 13, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion app/scripts/directives/addressFieldDrtv.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var addressFieldDrtv = function($compile, darkList) {
var checkDarkList = function(value) {
for(let i = 0; i < Darklist.length; i++) {
if(value.length > 0 && value === Darklist[i].address) {
scope.phishing.msg = Darklist[i].comment !== '' ? `This address has been flagged: ${Darklist[i].comment}` : 'This address has been flagged in our Phishing list. Please make sure you are sending to the right address';
scope.phishing.msg = Darklist[i].comment !== '' ? `${globalFuncs.phishingWarning[0] + Darklist[i].comment}` : `${globalFuncs.phishingWarning[1]}`;
scope.phishing.error = true;
return;
} else {
Expand Down
5 changes: 5 additions & 0 deletions app/scripts/globalFuncs.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ globalFuncs.errorMsgs = [
'Bid must be more than the specified minimum' // 39
];

globalFuncs.phishingWarning = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

you also have to add this to https://github.com/kvhnuke/etherwallet/blob/mercury/app/scripts/controllers/tabsCtrl.js#L261 thats where it gets the translated version and replace it with object's value

'This address has been flagged: ',
'This address has been flagged in our Phishing list. Please make sure you are sending to the right address'
]

// These are translated in the translation files
globalFuncs.successMsgs = [
'Valid address',
Expand Down
2 changes: 2 additions & 0 deletions app/scripts/translations/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,8 @@ HELP_SecCX_Desc_6 : 'If we were to encrypt these items, you would
HELP_SecCX_Title : 'Security - MyEtherWallet CX',
HELP_Warning : 'If you created a wallet -or- downloaded the repo before **Dec. 31st, 2015**, please check your wallets &amp; download a new version of the repo. Click for details.',

PHISHING_Warning_1 : 'This address has been flagged: ',
PHISHING_Warning_2 : 'This address has been flagged in our Phishing list. Please make sure you are sending to the right address'
};

module.exports = en;