import Tutorial from 'features/tutorial/components/Tutorial'
import NormalTxForm from './NormalTransactionForm'
import AdvancedTxForm from './AdvancedTransactionForm'
-import IssueAssets from './IssueAssets'
+import Vote from './Vote'
import { withRouter } from 'react-router'
import {getValues} from 'redux-form'
import {withNamespaces} from 'react-i18next'
return !(this.props.advform['actions'].length > 0 ||
this.props.advform['signTransaction'] ||
this.props.advform['password'])
- }else if(this.props.issueAssetSelected){
+ }else if(this.props.voteSelected){
+ const array = [
+ 'accountAlias',
+ 'accountId',
+ 'amount',
+ 'nodePubkey'
+ ]
+
+ for (let k in array){
+ if(this.props.voteform[array[k]]){
+ return false
+ }
+ }
return true
}
}
{t('transaction.new.advanced')}
</button>
<button
- className={`btn btn-default ${this.props.issueAssetSelected && 'active'}`}
- onClick={(e) => this.showForm(e, 'issueAsset')}>
- {t('transaction.issue.issueAsset')}
+ className={`btn btn-default ${this.props.voteSelected && 'active'}`}
+ onClick={(e) => this.showForm(e, 'vote')}>
+ {t('transaction.new.vote')}
</button>
</div>
</div>
handleKeyDown={this.handleKeyDown}
/>}
- {this.props.issueAssetSelected &&
- <IssueAssets
+ {this.props.voteSelected &&
+ <Vote
handleKeyDown={this.handleKeyDown}
{...this.props}
/>}
asset: Object.keys(state.asset.items).map(k => state.asset.items[k]),
normalform: getValues(state.form.NormalTransactionForm),
advform: getValues(state.form.AdvancedTransactionForm),
+ voteform: getValues(state.form.Vote),
tutorialVisible: !state.tutorial.location.isVisited,
normalSelected : ownProps.location.query.type == 'normal' || ownProps.location.query.type == undefined,
advancedSelected : ownProps.location.query.type == 'advanced',
- issueAssetSelected : ownProps.location.query.type == 'issueAsset',
+ voteSelected : ownProps.location.query.type == 'vote',
}
}