Merge pull request #116 from varasev/core
(Feature, CORE) Add ValidatorMetadata to drop-down list in "Modify Proxy Contract Ballot"
This commit is contained in:
commit
7c21001b2c
|
@ -11,7 +11,7 @@ export class BallotKeysMetadata extends React.Component {
|
|||
const { ballotStore } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<div className="hidden">
|
||||
<div>
|
||||
<div className="left">
|
||||
<div className="form-el">
|
||||
<label htmlFor="key">Affected Key</label>
|
||||
|
|
|
@ -9,7 +9,7 @@ export class BallotProxyMetadata extends React.Component {
|
|||
const { ballotStore } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<div className="hidden">
|
||||
<div>
|
||||
<div className="left">
|
||||
<div className="form-el">
|
||||
<label htmlFor="key">Proposed Address</label>
|
||||
|
@ -35,6 +35,8 @@ export class BallotProxyMetadata extends React.Component {
|
|||
{ value: '3', label: ballotStore.ProxyBallotType[3] },
|
||||
{ value: '4', label: ballotStore.ProxyBallotType[4] },
|
||||
{ value: '5', label: ballotStore.ProxyBallotType[5] },
|
||||
{ value: '7', label: ballotStore.ProxyBallotType[7] },
|
||||
{ value: '8', label: ballotStore.ProxyBallotType[8] },
|
||||
]}
|
||||
>
|
||||
</Select>
|
||||
|
|
|
@ -22,7 +22,7 @@ export class Validator extends React.Component {
|
|||
let addressType = address_component.types[0];
|
||||
switch(addressType) {
|
||||
case "postal_code":
|
||||
address_components.postal_code = Number(address_component.short_name);
|
||||
address_components.postal_code = address_component.short_name;
|
||||
break;
|
||||
case "street_number":
|
||||
address_components.street_number = address_component.short_name;
|
||||
|
@ -151,7 +151,7 @@ export class Validator extends React.Component {
|
|||
<div className="right">
|
||||
<div className="form-el">
|
||||
<label htmlFor="zip-code">Zip Code</label>
|
||||
<input type="number" id="zip-code"
|
||||
<input type="text" id="zip-code"
|
||||
value={validatorStore.zipCode}
|
||||
onChange={e => validatorStore.changeValidatorMetadata(e, "zipCode")}
|
||||
/>
|
||||
|
|
|
@ -23,7 +23,6 @@ export default class ValidatorMetadata {
|
|||
let createdDate = validatorData.createdDate > 0 ? moment.unix(validatorData.createdDate).format('YYYY-MM-DD') : ''
|
||||
let updatedDate = validatorData.updatedDate > 0 ? moment.unix(validatorData.updatedDate).format('YYYY-MM-DD') : ''
|
||||
let expirationDate = validatorData.expirationDate > 0 ? moment.unix(validatorData.expirationDate).format('YYYY-MM-DD') : ''
|
||||
let postal_code = Number(validatorData.zipcode) || ''
|
||||
return {
|
||||
firstName: toAscii(validatorData.firstName),
|
||||
lastName: toAscii(validatorData.lastName),
|
||||
|
@ -33,7 +32,7 @@ export default class ValidatorMetadata {
|
|||
expirationDate,
|
||||
licenseId: toAscii(validatorData.licenseId),
|
||||
us_state: toAscii(validatorData.state),
|
||||
postal_code,
|
||||
postal_code: toAscii(validatorData.zipcode),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@ class BallotStore {
|
|||
2: 'VotingToChangeKeys',
|
||||
3: 'VotingToChangeMinThreshold',
|
||||
4: 'VotingToChangeProxy',
|
||||
5: 'BallotsStorage'
|
||||
5: 'BallotsStorage',
|
||||
7: 'ValidatorMetadata',
|
||||
8: 'ValidatorMetadataEternalStorage'
|
||||
}
|
||||
@observable ballotType;
|
||||
@observable keysBallotType;
|
||||
|
|
Loading…
Reference in New Issue