throw new Error(resp.msg)
}
- const tpl = resp.data
- const password = (tpl.signing_instructions || []).map(() => '123456')
- const client = chainClient()
- const body = Object.assign({}, {password, 'transaction': tpl})
- return client.connection.request('/sign-submit-transaction', body, true)
+ const body = Object.assign({}, {password: formParams.password, 'transaction': resp.data})
+ return chainClient().connection.request('/sign-submit-transaction', body, true)
}).then(resp => {
if (resp.status === 'fail') {
throw new Error(resp.msg)
throw new Error(resp.msg)
}
- const tpl = resp.data
- const password = (tpl.signing_instructions || []).map(() => '123456')
- const client = chainClient()
- const body = Object.assign({}, {password, 'transaction': tpl})
- return client.connection.request('/sign-transaction', body, true)
+ const body = Object.assign({}, {password: formParams.password, 'transaction': resp.data})
+ return chainClient().connection.request('/sign-transaction', body, true)
}).then(resp => {
if (resp.status === 'fail') {
throw new Error(resp.msg)
type: 'GENERATED_TX_HEX',
generated: {
id: id,
- hex: resp.data.raw_transaction,
+ hex: resp.data.transaction.raw_transaction,
},
})
dispatch(push(`/transactions/generated/${id}`))
)}
</table>
+ <label className={styles.title}>Password</label>
+ <TextField placeholder='Password' fieldProps={password} autoFocus={false} type={'password'} />
</FormSection>}
{ this.state.showAdvanceTx && <FormSection title='Actions'>
</table>
</div>
</FormSection>}
+
+ {
+ this.state.showAdvanceTx && (actions.length > 0 || this.state.showAdvanced) && <FormSection>
+ <label className={styles.title}>Password</label>
+ <TextField placeholder='Password' fieldProps={password} autoFocus={false} type={'password'} />
+ </FormSection>
+ }
</FormContainer>
)
}
const mockHsmKeysAPI = (client) => {
return {
create: (params, cb) => {
- let body = Object.assign({}, params, {password: '123456'})
+ let body = Object.assign({}, params)
const uri = body.xprv ? '/import-private-key' : '/create-key'
return shared.tryCallback(