Skip to content

Commit

Permalink
feat: fill entity for add node form (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriexnet authored Mar 1, 2021
1 parent 1a22d45 commit 6cce293
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 1 addition & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ start:
make start-wallet
make start-hapi
make start-hasura
make start-webapp
make -j 2 start-hasura-cli start-logs
make -j 3 start-hasura-cli start-logs start-webapp

start-postgres:
@docker-compose up -d --build postgres
Expand Down
7 changes: 5 additions & 2 deletions webapp/src/components/ContractActionForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import LacchainSetEntInfoField from './LacchainSetEntInfoField'
import LacchainSetNodeInfoActionNodeField from './LacchainSetNodeInfoActionNodeField'
import LacchainSetNodeInfoActionInfoField from './LacchainSetNodeInfoActionInfoField'
import LacchainAddEntityActionEntityTypeField from './LacchainAddEntityActionEntityTypeField'
import LacchainAddValidatorActionEntityField from './LacchainAddValidatorActionEntityField'
import LacchainEntityField from './LacchainEntityField'
import LacchainAddValidatorActionValidatorAuthorityField from './LacchainAddValidatorActionValidatorAuthorityField'
import LacchainSetScheduleActionValidatorsField from './LacchainSetScheduleActionValidatorsField'
import EOSIONewAccountAuthority from './EOSIONewAccountAuthority'
Expand Down Expand Up @@ -121,9 +121,12 @@ const ContractActionForm = ({ accountName, action, abi, onSubmitAction }) => {
onChange={handleFieldChange(field.name)}
/>
)
case 'eosio.addboot.entity':
case 'eosio.addobserver.entity':
case 'eosio.addwriter.entity':
case 'eosio.addvalidator.entity':
return (
<LacchainAddValidatorActionEntityField
<LacchainEntityField
key={`action-field-${field.name}`}
label={field.name}
variant="outlined"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TextField } from '@material-ui/core'

import { useSharedState } from '../context/state.context'

const LacchainAddValidatorActionEntityField = ({
const LacchainEntityField = ({
value,
onChange,
label,
Expand Down Expand Up @@ -48,12 +48,12 @@ const LacchainAddValidatorActionEntityField = ({
)
}

LacchainAddValidatorActionEntityField.propTypes = {
LacchainEntityField.propTypes = {
value: PropTypes.string,
onChange: PropTypes.func,
label: PropTypes.string,
variant: PropTypes.string,
className: PropTypes.string
}

export default LacchainAddValidatorActionEntityField
export default LacchainEntityField

0 comments on commit 6cce293

Please sign in to comment.