aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-01-19 08:45:39 +0800
committerDan Finlay <dan@danfinlay.com>2017-01-19 08:45:39 +0800
commit5d8a3dd99b0cebad48e2fdcc4c407d7d89d4717c (patch)
tree4e6077ee705d894bbe33945c57ede27403aeb1e0 /ui/app
parent9126652f2e8b5b612f894bbb6c46fb1ef7861d06 (diff)
downloadtangerine-wallet-browser-5d8a3dd99b0cebad48e2fdcc4c407d7d89d4717c.tar
tangerine-wallet-browser-5d8a3dd99b0cebad48e2fdcc4c407d7d89d4717c.tar.gz
tangerine-wallet-browser-5d8a3dd99b0cebad48e2fdcc4c407d7d89d4717c.tar.bz2
tangerine-wallet-browser-5d8a3dd99b0cebad48e2fdcc4c407d7d89d4717c.tar.lz
tangerine-wallet-browser-5d8a3dd99b0cebad48e2fdcc4c407d7d89d4717c.tar.xz
tangerine-wallet-browser-5d8a3dd99b0cebad48e2fdcc4c407d7d89d4717c.tar.zst
tangerine-wallet-browser-5d8a3dd99b0cebad48e2fdcc4c407d7d89d4717c.zip
Add ability to import v3 JSON wallets
There is now a menu item labeled "JSON File" for importing, and it can digest either: - v1 MyEtherWallet JSON files - v3 Account files (used by Geth, Mist, and MyEtherWallet). Fixes #715
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/actions.js5
-rw-r--r--ui/app/app.js5
-rw-r--r--ui/app/components/loading.js8
-rw-r--r--ui/app/reducers/app.js1
4 files changed, 14 insertions, 5 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 36efa4bc6..bf3617310 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -267,7 +267,7 @@ function addNewKeyring (type, opts) {
function importNewAccount (strategy, args) {
return (dispatch) => {
- dispatch(actions.showLoadingIndication())
+ dispatch(actions.showLoadingIndication('This may take a while, be patient.'))
background.importAccountWithStrategy(strategy, args, (err, newState) => {
dispatch(actions.hideLoadingIndication())
if (err) return dispatch(actions.displayWarning(err.message))
@@ -630,9 +630,10 @@ function useEtherscanProvider () {
}
}
-function showLoadingIndication () {
+function showLoadingIndication (message) {
return {
type: actions.SHOW_LOADING,
+ value: message,
}
}
diff --git a/ui/app/app.js b/ui/app/app.js
index 0e04c334c..d8dedd397 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -43,6 +43,7 @@ function mapStateToProps (state) {
return {
// state from plugin
isLoading: state.appState.isLoading,
+ loadingMessage: state.appState.loadingMessage,
isDisclaimerConfirmed: state.metamask.isDisclaimerConfirmed,
noActiveNotices: state.metamask.noActiveNotices,
isInitialized: state.metamask.isInitialized,
@@ -64,7 +65,7 @@ function mapStateToProps (state) {
App.prototype.render = function () {
var props = this.props
- const { isLoading, transForward } = props
+ const { isLoading, loadingMessage, transForward } = props
return (
@@ -76,7 +77,7 @@ App.prototype.render = function () {
},
}, [
- h(LoadingIndicator, { isLoading }),
+ h(LoadingIndicator, { isLoading, loadingMessage }),
// app bar
this.renderAppBar(),
diff --git a/ui/app/components/loading.js b/ui/app/components/loading.js
index ae735894f..88dc535df 100644
--- a/ui/app/components/loading.js
+++ b/ui/app/components/loading.js
@@ -12,7 +12,7 @@ function LoadingIndicator () {
}
LoadingIndicator.prototype.render = function () {
- var isLoading = this.props.isLoading
+ const { isLoading, loadingMessage } = this.props
return (
h(ReactCSSTransitionGroup, {
@@ -37,8 +37,14 @@ LoadingIndicator.prototype.render = function () {
h('img', {
src: 'images/loading.svg',
}),
+
+ showMessageIfAny(loadingMessage),
]) : null,
])
)
}
+function showMessageIfAny (loadingMessage) {
+ if (!loadingMessage) return null
+ return h('span', loadingMessage)
+}
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index ae91272cc..6a2c93f78 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -386,6 +386,7 @@ function reduceApp (state, action) {
case actions.SHOW_LOADING:
return extend(appState, {
isLoading: true,
+ loadingMessage: action.value,
})
case actions.HIDE_LOADING: