diff options
author | Thomas Huang <tmashuang@users.noreply.github.com> | 2019-04-18 22:22:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 22:22:45 +0800 |
commit | 4fa9576cc11add92da6f01d6d8831a9bfb239551 (patch) | |
tree | 5d1d1af77464b3bc1cc30f1e88e7f5a32733a0bc | |
parent | 3519e90ffdec61589359f44556994f42492fffd8 (diff) | |
parent | 8a82e629bfa6545d09adf58e5b5d32cbdb1fba6f (diff) | |
download | tangerine-wallet-browser-4fa9576cc11add92da6f01d6d8831a9bfb239551.tar.gz tangerine-wallet-browser-4fa9576cc11add92da6f01d6d8831a9bfb239551.tar.zst tangerine-wallet-browser-4fa9576cc11add92da6f01d6d8831a9bfb239551.zip |
Merge pull request #6481 from MetaMask/address-prop-types-errors
Address prop types errors
3 files changed, 4 insertions, 3 deletions
diff --git a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js index a90fe148f..cc73b2ea7 100644 --- a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js +++ b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js @@ -18,7 +18,7 @@ const mapStateToProps = ({ metamask }) => { const mapDispatchToProps = dispatch => { return { - addToken: ({address, symbol, decimals, image}) => dispatch(addToken(address, symbol, decimals, image)), + addToken: ({address, symbol, decimals, image}) => dispatch(addToken(address, symbol, Number(decimals), image)), removeSuggestedTokens: () => dispatch(removeSuggestedTokens()), } } diff --git a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js b/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js index 2982526cb..de2d9462f 100644 --- a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js +++ b/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js @@ -11,7 +11,7 @@ export default class SendAssetRow extends Component { tokens: PropTypes.arrayOf( PropTypes.shape({ address: PropTypes.string, - decimals: PropTypes.number, + decimals: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), symbol: PropTypes.string, }) ).isRequired, diff --git a/ui/app/selectors/selectors.js b/ui/app/selectors/selectors.js index da9cf57c7..2d25aa156 100644 --- a/ui/app/selectors/selectors.js +++ b/ui/app/selectors/selectors.js @@ -91,7 +91,8 @@ function getAccountType (state) { } function getSelectedAsset (state) { - return getSelectedToken(state) || 'ETH' + const selectedToken = getSelectedToken(state) + return selectedToken && selectedToken.symbol || 'ETH' } function getCurrentNetworkId (state) { |