Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
fix: Fixes #248. Add validation warning when user tries to send ETH o…
Browse files Browse the repository at this point in the history
…r a token to the zero account
  • Loading branch information
ltfschoen committed Dec 13, 2018
1 parent 2cb5494 commit 2169e8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/fether-react/src/Send/TxForm/TxForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ class Send extends Component {
return { amount: `You don't have enough ${token.symbol} balance` };
} else if (!values.to || !isAddress(values.to)) {
return { to: 'Please enter a valid Ethereum address' };
} else if (values.to === '0x0000000000000000000000000000000000000000') {
return {
to: `You are not permitted to send ${
token.name
} to the zero account (0x0)`
};
}
return true;
};
Expand Down

0 comments on commit 2169e8f

Please sign in to comment.