}
componentDidMount() {
- this.props.fetchKeyItem().then(resp => {
+ this.props.fetchAccountItem().then(resp => {
if (resp.data.length == 0) {
this.setState({noAccountItem: true})
this.props.updateAccountInit(false)
showRoot: () => dispatch(actions.app.showRoot),
showInitialization: () => dispatch(actions.app.showInitialization()),
updateAccountInit: (param) => dispatch(actions.app.updateAccountInit(param)),
- fetchKeyItem: () => dispatch(actions.key.fetchItems())
+ fetchAccountItem: () => dispatch(actions.account.fetchItems())
})
)( withI18n() (Container) )
}
case 'ERROR': {
- return newError(state, action.payload.message)
+ return newError(state, action.payload.message||action.payload.msg)
}
case 'USER_LOG_IN': {
<PageTitle
title={t('coreIndex.coreStatus')}
actions={[
- <button className='btn btn-link' onClick={this.consolePopup}>
- <img src={require('images/console-window.svg')}/>
+ <button className={`btn btn-link ${styles.actionBtn}`} onClick={this.consolePopup}>
+ <span>{t('console.title')}</span> <img src={require('images/console-window.svg')}/>
</button>
]}
/>
vertical-align: top;
}
}
+.actionBtn{
+ img{
+ margin-bottom: 3px;
+ }
+}
.row{
line-height: 30px;
-webkit-transition: .4s;
transition: .4s;
border-radius: 50%;
-}
\ No newline at end of file
+}
addActionItem(type) {
const counter = this.state.counter
- this.props.fields.actions.addField({
- type: type,
- ID: counter
- })
+ let obj
+ if(type === 'spend_account' || type === 'veto'){
+ obj = {
+ type: type,
+ ID: counter,
+ accountAlias: this.props.currentAccount
+ }
+ }else{
+ obj = {
+ type: type,
+ ID: counter,
+ }
+ }
+ this.props.fields.actions.addField(obj)
this.closeDropdown()
this.setState({
counter: counter+1
<FormSection title='Actions'>
{actions.map((action, index) =>
<ActionItem
- key={action.ID.value}
+ key={`form-action-${action.ID.value}`}
index={index}
fieldProps={action}
accounts={this.props.accounts}
export default withNamespaces('translations') (BaseNew.connect(
(state, ownProps) => ({
...BaseNew.mapStateToProps('transaction')(state, ownProps),
- decodedTx: state.transaction.decodedTx
+ decodedTx: state.transaction.decodedTx,
+ currentAccount : state.account.currentAccount
}),
mapDispatchToProps,
reduxForm({
id: accountId,
alias: accountAlias
}}
+ disabled
/>
<ObjectSelectorField
id: accountId,
alias: accountAlias
}}
+ disabled
/>}
{visible.receiver &&
handleFormEmpty() {
if(this.props.normalSelected){
const array = [
- 'accountAlias',
- 'accountId',
'assetAlias',
'assetId',
'password']
this.props.advform['password'])
}else if(this.props.voteSelected){
const array = [
- 'accountAlias',
- 'accountId',
'amount',
'nodePubkey'
]
return true
}else if(this.props.crossChainSelected){
const array = [
- 'accountAlias',
- 'accountId',
'assetAlias',
'assetId',
'address',
id: accountId,
alias: accountAlias
}}
+ disabled
/>
<div>
<ObjectSelectorField
id: accountId,
alias: accountAlias
}}
+ disabled
/>
<div>
<TextField