diff --git a/react/src/actions/actions/settings.js b/react/src/actions/actions/settings.js index 6f61fe4..21a01a3 100644 --- a/react/src/actions/actions/settings.js +++ b/react/src/actions/actions/settings.js @@ -42,7 +42,7 @@ export function getAppInfo() { export function settingsWifkeyState(json, coin) { return { type: GET_WIF_KEY, - wifkey: json[`${coin}wif`], + wifkey: json, address: json[coin], } } diff --git a/react/src/components/dashboard/settings.js b/react/src/components/dashboard/settings.js index 98e8f9a..8c6d9ac 100644 --- a/react/src/components/dashboard/settings.js +++ b/react/src/components/dashboard/settings.js @@ -39,6 +39,7 @@ class Settings extends React.Component { cliCmdString: null, cliCoin: null, cliResponse: null, + exportWifKeysRaw: false, }; this.exportWifKeys = this.exportWifKeys.bind(this); this.updateInput = this.updateInput.bind(this); @@ -50,6 +51,7 @@ class Settings extends React.Component { this.renderPeersList = this.renderPeersList.bind(this); this.renderSNPeersList = this.renderSNPeersList.bind(this); this._saveAppConfig = this._saveAppConfig.bind(this); + this.exportWifKeysRaw = this.exportWifKeysRaw.bind(this); } componentDidMount() { @@ -406,6 +408,60 @@ class Settings extends React.Component { } } + renderExportWifKeysRaw() { + const _wifKeysResponse = this.props.Settings.wifkey; + + if (_wifKeysResponse && + this.state.exportWifKeysRaw) { + return ( +
- { this.props.ActiveCoin.coin } - | -{ this.props.Settings.address } | -
- { this.props.ActiveCoin.coin }Wif - | -{ this.props.Settings.wifkey } | -