<input type='file' style={{'display': 'flex', 'alignItems': 'center', 'fontSize': '12px'}}
onChange={this.handleFileChange.bind(this)}/>
}
- <TextField title='Password' placeholder='Password' fieldProps={password} autoFocus={false} type={'password'} />
+
+ {false &&
+ <TextField title='Password' placeholder='Password' fieldProps={password} autoFocus={false} type={'password'} />
+ }
</FormSection>
</FormContainer>
)
}
form.submitForm = (formParams) => function(dispatch) {
+ const {password} = formParams
const buildPromise = chainClient().transactions.build(builder => {
const processed = preprocessTransaction(formParams)
return buildPromise
.then(({data: tpl}) => {
const client = chainClient()
- const body = Object.assign({}, {auth: '123456', 'transaction': tpl})
+ const body = Object.assign({}, {password, 'transaction': tpl})
return client.connection.request('/sign-submit-transaction', body, true)
}).then(resp => {
if (resp.status === 'fail') {
}
const visibleFields = {
- [ISSUE_KEY]: {asset: true, amount: true},
- [SPEND_ACCOUNT_KEY]: {asset: true, account: true, amount: true},
- [SPEND_UNSPENT_KEY]: {outputId: true},
+ [ISSUE_KEY]: {asset: true, amount: true, password: true},
+ [SPEND_ACCOUNT_KEY]: {asset: true, account: true, amount: true, password: true},
+ [SPEND_UNSPENT_KEY]: {outputId: true, password: true},
[CONTROL_ACCOUNT_KEY]: {asset: true, account: true, amount: true},
[CONTROL_RECEIVER_KEY]: {asset: true, receiver: true, amount: true},
[CONTROL_ADDRESS_KEY]: {asset: true, address: true, amount: true},
receiver,
assetId,
assetAlias,
+ password,
amount,
referenceData } = this.props.fieldProps
{visible.amount &&
<TextField title='Amount' fieldProps={amount} />}
+ {visible.password && false &&
+ <TextField title='Password' placeholder='Password' fieldProps={password} autoFocus={false} type={'password'} />
+ }
+
{false && this.state.referenceDataOpen &&
<JsonField title='Reference data' fieldProps={referenceData} />
}
}
submitWithValidation(data) {
- // if (this.props.replicationLag === null || this.props.replicationLag >= lagThreshold) {
- // return Promise.reject({
- // _error: `Replication lag must be less than ${lagThreshold} to submit transactions via the dashboard. Please wait for the local core to catch up to the generator.`
- // })
- // }
-
return new Promise((resolve, reject) => {
this.props.submitForm(data)
.catch((err) => {
render() {
const {
- fields: { baseTransaction, actions, submitAction },
+ fields: { baseTransaction, actions, submitAction, password },
error,
handleSubmit,
submitting
'actions[].referenceData',
'actions[].type',
'actions[].address',
+ 'actions[].password',
'submitAction',
+ 'password'
],
validate,
initialValues: {
const mockHsmKeysAPI = (client) => {
return {
create: (params, cb) => {
- let body = Object.assign({}, params)
+ let body = Object.assign({}, params, {password: '123456'})
const uri = body.xprv ? '/import-private-key' : '/create-key'
return shared.tryCallback(