diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-06-06 02:40:20 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-06-06 02:48:04 +0800 |
commit | bb6e41963d42a91ecc34a728b7c0c18d26e6cd9f (patch) | |
tree | e014ffb8fc923792c043c6699ba0409a67480dc4 /ui/app/components/pending-tx.js | |
parent | 9eea990425f1f68eabca8b283bdfc662befcd226 (diff) | |
download | tangerine-wallet-browser-bb6e41963d42a91ecc34a728b7c0c18d26e6cd9f.tar tangerine-wallet-browser-bb6e41963d42a91ecc34a728b7c0c18d26e6cd9f.tar.gz tangerine-wallet-browser-bb6e41963d42a91ecc34a728b7c0c18d26e6cd9f.tar.bz2 tangerine-wallet-browser-bb6e41963d42a91ecc34a728b7c0c18d26e6cd9f.tar.lz tangerine-wallet-browser-bb6e41963d42a91ecc34a728b7c0c18d26e6cd9f.tar.xz tangerine-wallet-browser-bb6e41963d42a91ecc34a728b7c0c18d26e6cd9f.tar.zst tangerine-wallet-browser-bb6e41963d42a91ecc34a728b7c0c18d26e6cd9f.zip |
Dissallow transactions to be sent to 0x0000000000000000000000000000000000000000
Diffstat (limited to 'ui/app/components/pending-tx.js')
-rw-r--r-- | ui/app/components/pending-tx.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index b46f715bc..e8bf32d92 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -44,6 +44,9 @@ PendingTx.prototype.render = function () { const account = props.accounts[address] const balance = account ? account.balance : '0x0' + // recipient check + const isValidAddress = !(txParams.to === '0x0000000000000000000000000000000000000000') + // Gas const gas = txParams.gas const gasBn = hexToBn(gas) @@ -261,6 +264,15 @@ PendingTx.prototype.render = function () { }, 'Transaction Error. Exception thrown in contract code.') : null, + !isValidAddress ? + h('.error', { + style: { + marginLeft: 50, + fontSize: '0.9em', + }, + }, 'Recipient address is invalid sending this transaction will result in a loss of ETH.') + : null, + insufficientBalance ? h('span.error', { style: { @@ -298,7 +310,7 @@ PendingTx.prototype.render = function () { type: 'submit', value: 'ACCEPT', style: { marginLeft: '10px' }, - disabled: insufficientBalance || !this.state.valid, + disabled: insufficientBalance || !this.state.valid || !isValidAddress, }), h('button.cancel.btn-red', { |