OSDN Git Service

update key alias update
authorZhiting Lin <zlin035@uottawa.ca>
Wed, 14 Nov 2018 09:04:35 +0000 (17:04 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Wed, 14 Nov 2018 09:04:35 +0000 (17:04 +0800)
src/features/mockhsm/actions.js
src/features/mockhsm/components/KeyUpdate.jsx

index 9502173..5ad8545 100644 (file)
@@ -39,7 +39,6 @@ update.submitUpdateForm = (data, xpub) => {
   return function(dispatch) {
     return promise.then(() => clientApi().updateAlias({
       xpub: xpub,
-      password: data.password,
       newAlias: data.alias,
     }).then((resp) => {
       if (resp.status === 'fail') {
index 74a2cdf..f2e4849 100644 (file)
@@ -1,5 +1,5 @@
 import React from 'react'
-import { BaseUpdate, FormContainer, FormSection, NotFound, TextField, PasswordField } from 'features/shared/components'
+import { BaseUpdate, FormContainer, FormSection, NotFound, TextField } from 'features/shared/components'
 import { reduxForm } from 'redux-form'
 import {withNamespaces} from 'react-i18next'
 
@@ -37,7 +37,7 @@ class Form extends React.Component {
     }
 
     const {
-      fields: { password, alias },
+      fields: { alias },
       error,
       handleSubmit,
       submitting,
@@ -63,11 +63,6 @@ class Form extends React.Component {
           fieldProps={alias}
           type= 'text'
         />
-        <PasswordField
-          title = {t('key.password')}
-          placeholder={t('key.passwordPlaceholder')}
-          fieldProps={password}
-        />
       </FormSection>
     </FormContainer>
   }
@@ -91,7 +86,7 @@ const initialValues = (state, ownProps) => {
 
 const updateForm = reduxForm({
   form: 'updateKeyForm',
-  fields: ['password','alias'],
+  fields: ['alias'],
 }, initialValues)(Form)
 
 export default withNamespaces('translations') (BaseUpdate.connect(