Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

minor typo fix and added extra security checks #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bernardpeh
Copy link

added .gitignore and remove references to the "pet shop" tutorial. Added a check to not transfer token to ownself.

src/js/app.js Outdated
@@ -46,7 +46,7 @@ App = {
var amount = parseInt($('#TTTransferAmount').val());
var toAddress = $('#TTTransferAddress').val();

console.log('Transfer ' + amount + ' TT to ' + toAddress);
console.log('Transfering ' + amount + ' TT to ' + toAddress);
Copy link

Choose a reason for hiding this comment

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

Typo, this should be Transferring.

src/js/app.js Outdated
@@ -57,20 +57,30 @@ App = {

var account = accounts[0];

// user cannot transfer tokens to himself
if (toAddress.toLowerCase() == account.toLowerCase()) {
alert('Sorry, you cannot transfer token to yourself');
Copy link

Choose a reason for hiding this comment

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

I would reword these two lines to:

Sorry, you cannot transfer tokens to yourself (make token plural)

@bernardpeh
Copy link
Author

bernardpeh commented Aug 18, 2017

fixed. nice tutorial.

src/js/app.js Outdated
if (toAddress.toLowerCase() == account.toLowerCase()) {
alert('Sorry, you cannot transfer token to yourself');
throw new Error('cannot transfer token to yourself');
alert('Sorry, you cannot transfer tokens nto yourself');
Copy link

Choose a reason for hiding this comment

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

typo: nto should be to

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants