diff --git a/app/components/Transfer/Transfer.jsx b/app/components/Transfer/Transfer.jsx index c27a762728..1b841a573e 100644 --- a/app/components/Transfer/Transfer.jsx +++ b/app/components/Transfer/Transfer.jsx @@ -14,7 +14,8 @@ import Immutable from "immutable"; import {ChainStore} from "bitsharesjs/es"; import {connect} from "alt-react"; import { checkFeeStatusAsync, checkBalance } from "common/trxHelper"; -import { debounce } from "lodash"; +import { debounce, isNaN } from "lodash"; +import classnames from "classnames"; import { Asset } from "common/MarketClasses"; class Transfer extends React.Component { @@ -358,10 +359,10 @@ class Transfer extends React.Component { } let propose_incomplete = propose && ! propose_account; - let submitButtonClass = "button float-right no-margin"; - if(!from_account || !to_account || !amount || amount === "0"|| !asset || from_error || propose_incomplete || balanceError) - submitButtonClass += " disabled"; - + const amountValue = parseFloat(String.prototype.replace.call(amount, /,/g, "")); + const isAmountValid = amountValue && !isNaN(amountValue); + const isToAccountValid = to_account && to_account.get("name") === to_name; + const isSendNotValid = !from_account || !isToAccountValid || !isAmountValid || !asset || from_error || propose_incomplete || balanceError; let accountsList = Immutable.Set(); accountsList = accountsList.add(from_account); let tabIndex = 1; @@ -440,10 +441,10 @@ class Transfer extends React.Component { error={this.state.hasPoolBalance === false ? "transfer.errors.insufficient" : null} /> {propose ? - : - }