aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/coinbase-form.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-18 05:51:32 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-18 05:51:32 +0800
commit4352c7031afb6f9a175b29d0addeb7ea48345676 (patch)
treeecb311d43d0f77d5f5f0e82a0014a09c6381f0ef /ui/app/components/coinbase-form.js
parentf229d32442f34859be169e38a42ffecdfb8fc48a (diff)
parent592b64a19fd7001d965aa1a1c329b24f55d2ea90 (diff)
downloadtangerine-wallet-browser-4352c7031afb6f9a175b29d0addeb7ea48345676.tar.gz
tangerine-wallet-browser-4352c7031afb6f9a175b29d0addeb7ea48345676.tar.zst
tangerine-wallet-browser-4352c7031afb6f9a175b29d0addeb7ea48345676.zip
Merge branch 'i328-MultiVault' of github.com:MetaMask/metamask-plugin into i328-MultiVault
Diffstat (limited to 'ui/app/components/coinbase-form.js')
-rw-r--r--ui/app/components/coinbase-form.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/ui/app/components/coinbase-form.js b/ui/app/components/coinbase-form.js
index efd05ec96..693eb2ea8 100644
--- a/ui/app/components/coinbase-form.js
+++ b/ui/app/components/coinbase-form.js
@@ -7,7 +7,7 @@ const actions = require('../actions')
const isValidAddress = require('../util').isValidAddress
module.exports = connect(mapStateToProps)(CoinbaseForm)
-function mapStateToProps(state) {
+function mapStateToProps (state) {
return {
selectedAccount: state.selectedAccount,
warning: state.appState.warning,
@@ -16,7 +16,7 @@ function mapStateToProps(state) {
inherits(CoinbaseForm, Component)
-function CoinbaseForm() {
+function CoinbaseForm () {
Component.call(this)
}
@@ -116,15 +116,14 @@ CoinbaseForm.prototype.toCoinbase = function () {
props.dispatch(actions.buyEth(address, props.buyView.amount))
} else if (!isValidAmountforCoinBase(amount).valid) {
message = isValidAmountforCoinBase(amount).message
- return props.dispatch(actions.showWarning(message))
+ return props.dispatch(actions.displayWarning(message))
} else {
message = 'Receiving address is invalid.'
- return props.dispatch(actions.showWarning(message))
+ return props.dispatch(actions.displayWarning(message))
}
}
CoinbaseForm.prototype.renderLoading = function () {
-
return h('img', {
style: {
width: '27px',
@@ -134,9 +133,8 @@ CoinbaseForm.prototype.renderLoading = function () {
})
}
-function isValidAmountforCoinBase(amount) {
+function isValidAmountforCoinBase (amount) {
amount = parseFloat(amount)
-
if (amount) {
if (amount <= 5 && amount > 0) {
return {