From 0e6bc2d70bec14471240319f554dbda2f7bd275a Mon Sep 17 00:00:00 2001 From: Aaron Cox Date: Mon, 19 Sep 2022 16:27:08 -0400 Subject: [PATCH] Adding more details to keycert import to trace errors. --- app/modules/main/actions/account.js | 10 +++++- .../Setup/Elements/Recover/EncryptionWords.js | 34 +++++++++++++++---- package.json | 2 +- yarn.lock | 8 ++--- 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/app/modules/main/actions/account.js b/app/modules/main/actions/account.js index 31be46a86d..a841848eef 100644 --- a/app/modules/main/actions/account.js +++ b/app/modules/main/actions/account.js @@ -285,7 +285,15 @@ export function returnKeyCertificateDecrypted(cert) { } return dispatch({ type: types.ACCOUNT_KEY_CERTIFICATE_DECRYPTED_MISMATCH, - payload: 'The key certificate does not match the account specified.' + payload: { + account: cert.account, + auth, + blockchain: cert.blockchain.chainId, + data: result.data.permissions, + message: 'The key certificate does not match the account specified.', + publicKey: cert.publicKey, + server: cert.blockchain.node, + } }); } return dispatch({ diff --git a/app/modules/main/containers/Sections/Home/Setup/Elements/Recover/EncryptionWords.js b/app/modules/main/containers/Sections/Home/Setup/Elements/Recover/EncryptionWords.js index 9d46f1abfc..6f3fe573f8 100644 --- a/app/modules/main/containers/Sections/Home/Setup/Elements/Recover/EncryptionWords.js +++ b/app/modules/main/containers/Sections/Home/Setup/Elements/Recover/EncryptionWords.js @@ -6,7 +6,7 @@ import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import compose from 'lodash/fp/compose'; -import { Button, Divider, Header, Message, Segment } from 'semantic-ui-react'; +import { Accordion, Button, Divider, Header, Icon, Message, Segment } from 'semantic-ui-react'; import AccountSetupElementsWordsList from '../Words/List'; import GlobalFormFieldWords from '../../../../../../../../shared/components/Global/Form/Field/Words'; @@ -14,7 +14,8 @@ import GlobalFormFieldWords from '../../../../../../../../shared/components/Glob class AccountSetupRecoverEncryptionWords extends Component { state = { // Encryption Keys (6 words) - encryption: [], + encryption: ['shine', 'aware', 'copper', 'turkey', 'sting', 'logic'], + expandedError: false, } addEncryptionWord = (value) => { this.setState({ @@ -35,9 +36,13 @@ class AccountSetupRecoverEncryptionWords extends Component { this.props.setEncryptionWords(this.state.encryption); this.props.onClick(); } + expandError = () => { + this.setState({ expandedError: !this.state.expandedError }) + } render() { const { encryption, + expandedError, } = this.state; const { error @@ -79,11 +84,26 @@ class AccountSetupRecoverEncryptionWords extends Component { } {(error) ? ( - +
+ + + + + Expand error details for troubleshooting + + +
{JSON.stringify(error, null, '\t')}
+
+
+
) : (