diff options
author | Esteban MiƱo <efmino@uc.cl> | 2019-01-23 03:05:59 +0800 |
---|---|---|
committer | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2019-01-23 03:05:59 +0800 |
commit | 1d93d9a3852daf3842ef71c3775f41cbb79a3f00 (patch) | |
tree | d4643fb30d6b1ad39eb06f7af68c111f5a42ba7a /ui/app/components/send/send-content/send-to-row/send-to-row.component.js | |
parent | 2cfea0b788e4c3f9420358ef62cff46850fc8146 (diff) | |
download | tangerine-wallet-browser-1d93d9a3852daf3842ef71c3775f41cbb79a3f00.tar tangerine-wallet-browser-1d93d9a3852daf3842ef71c3775f41cbb79a3f00.tar.gz tangerine-wallet-browser-1d93d9a3852daf3842ef71c3775f41cbb79a3f00.tar.bz2 tangerine-wallet-browser-1d93d9a3852daf3842ef71c3775f41cbb79a3f00.tar.lz tangerine-wallet-browser-1d93d9a3852daf3842ef71c3775f41cbb79a3f00.tar.xz tangerine-wallet-browser-1d93d9a3852daf3842ef71c3775f41cbb79a3f00.tar.zst tangerine-wallet-browser-1d93d9a3852daf3842ef71c3775f41cbb79a3f00.zip |
Prevent send to token (#6051)
* check contact metadata
* check for tokens in state
* tests
* update tests
* validation only if sending tokens
* container test
Diffstat (limited to 'ui/app/components/send/send-content/send-to-row/send-to-row.component.js')
-rw-r--r-- | ui/app/components/send/send-content/send-to-row/send-to-row.component.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/app/components/send/send-content/send-to-row/send-to-row.component.js b/ui/app/components/send/send-content/send-to-row/send-to-row.component.js index ce5325314..dbcc4ecd6 100644 --- a/ui/app/components/send/send-content/send-to-row/send-to-row.component.js +++ b/ui/app/components/send/send-content/send-to-row/send-to-row.component.js @@ -12,9 +12,11 @@ export default class SendToRow extends Component { inError: PropTypes.bool, network: PropTypes.string, openToDropdown: PropTypes.func, + selectedToken: PropTypes.object, to: PropTypes.string, toAccounts: PropTypes.array, toDropdownOpen: PropTypes.bool, + tokens: PropTypes.array, updateGas: PropTypes.func, updateSendTo: PropTypes.func, updateSendToError: PropTypes.func, @@ -26,8 +28,8 @@ export default class SendToRow extends Component { } handleToChange (to, nickname = '', toError) { - const { hasHexData, updateSendTo, updateSendToError, updateGas } = this.props - const toErrorObject = getToErrorObject(to, toError, hasHexData) + const { hasHexData, updateSendTo, updateSendToError, updateGas, tokens, selectedToken } = this.props + const toErrorObject = getToErrorObject(to, toError, hasHexData, tokens, selectedToken) updateSendTo(to, nickname) updateSendToError(toErrorObject) if (toErrorObject.to === null) { |