aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2019-04-18 07:56:25 +0800
committerDan Miller <danjm.com@gmail.com>2019-04-18 07:56:25 +0800
commit8a82e629bfa6545d09adf58e5b5d32cbdb1fba6f (patch)
treefac935f34fbd8a7e172800257311c267871b3d98 /ui
parent8c075b71586761aa7e813c7fb9ddddfa98f3a84a (diff)
downloadtangerine-wallet-browser-8a82e629bfa6545d09adf58e5b5d32cbdb1fba6f.tar
tangerine-wallet-browser-8a82e629bfa6545d09adf58e5b5d32cbdb1fba6f.tar.gz
tangerine-wallet-browser-8a82e629bfa6545d09adf58e5b5d32cbdb1fba6f.tar.bz2
tangerine-wallet-browser-8a82e629bfa6545d09adf58e5b5d32cbdb1fba6f.tar.lz
tangerine-wallet-browser-8a82e629bfa6545d09adf58e5b5d32cbdb1fba6f.tar.xz
tangerine-wallet-browser-8a82e629bfa6545d09adf58e5b5d32cbdb1fba6f.tar.zst
tangerine-wallet-browser-8a82e629bfa6545d09adf58e5b5d32cbdb1fba6f.zip
Ensure future tokens add decimals as numbers while supporting numbers and strings in send-asset-row
Diffstat (limited to 'ui')
-rw-r--r--ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js2
-rw-r--r--ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js2
2 files changed, 2 insertions, 2 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,