diff options
author | Dan <danjm.com@gmail.com> | 2017-09-23 03:57:18 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-28 09:06:26 +0800 |
commit | 01816e1b2216e0cf849ec3d67f01b1e571d69fa4 (patch) | |
tree | 98793fbec7de107a824d953ec7a1a259856be592 /ui/app/components/modals/export-private-key-modal.js | |
parent | c77029ea90560b4210f9204e99314d30f9b59989 (diff) | |
download | tangerine-wallet-browser-01816e1b2216e0cf849ec3d67f01b1e571d69fa4.tar.gz tangerine-wallet-browser-01816e1b2216e0cf849ec3d67f01b1e571d69fa4.tar.zst tangerine-wallet-browser-01816e1b2216e0cf849ec3d67f01b1e571d69fa4.zip |
Adds a back button to export private key modal; connects account details to same modal.
Diffstat (limited to 'ui/app/components/modals/export-private-key-modal.js')
-rw-r--r-- | ui/app/components/modals/export-private-key-modal.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ui/app/components/modals/export-private-key-modal.js b/ui/app/components/modals/export-private-key-modal.js index b1d551781..4bb34f8c6 100644 --- a/ui/app/components/modals/export-private-key-modal.js +++ b/ui/app/components/modals/export-private-key-modal.js @@ -14,12 +14,14 @@ function mapStateToProps (state) { privateKey: state.appState.accountDetail.privateKey, network: state.metamask.network, selectedIdentity: getSelectedIdentity(state), + previousModalState: state.appState.modal.previousModalState.name, } } function mapDispatchToProps (dispatch) { return { exportAccount: (password, address) => dispatch(actions.exportAccount(password, address)), + showAccountDetailModal: () => dispatch(actions.showModal({ name: 'ACCOUNT_DETAILS' })), hideModal: () => dispatch(actions.hideModal()), } } @@ -86,10 +88,16 @@ ExportPrivateKeyModal.prototype.render = function () { network, privateKey, warning, + showAccountDetailModal, + hideModal, + previousModalState, } = this.props const { name, address } = selectedIdentity - return h(AccountModalContainer, {}, [ + return h(AccountModalContainer, { + showBackButton: previousModalState === 'ACCOUNT_DETAILS', + backButtonAction: () => showAccountDetailModal(), + }, [ h('span.account-name', name), |