diff --git a/app/assets/locales/locale-en.json b/app/assets/locales/locale-en.json index 7c8ce14464..3b8b3a920d 100644 --- a/app/assets/locales/locale-en.json +++ b/app/assets/locales/locale-en.json @@ -895,6 +895,7 @@ "backup_favorites": "Restore favorites using a json file", "backup_favorites_error": "Could not parse JSON.", "backup_favorites_finish": "Import favorites", + "backup_favorites_success": "Successfully restored market favorites", "backupcreate_backup": "Create local wallet backup", "backupcreate_brainkey": "Create brainkey backup", "backupcreate_favorites": "Create favorites backup", diff --git a/app/components/Settings/RestoreFavorites.jsx b/app/components/Settings/RestoreFavorites.jsx index e31085b68a..c408be2f63 100644 --- a/app/components/Settings/RestoreFavorites.jsx +++ b/app/components/Settings/RestoreFavorites.jsx @@ -1,8 +1,8 @@ import React from "react"; import Translate from "react-translate-component"; -import Immutable from "immutable" import SettingsActions from "actions/SettingsActions"; -import { connect } from "alt-react"; +import notify from "actions/NotificationActions"; +import counterpart from "counterpart"; class RestoreFavorites extends React.Component { constructor(props){ @@ -11,7 +11,7 @@ class RestoreFavorites extends React.Component { this.state = { json: null, error: null - } + }; } upload(evt){ @@ -33,7 +33,7 @@ class RestoreFavorites extends React.Component { } this.setState({json}); - this.finish(); + // this.finish(); } catch(message) { this.setState({error: true}); } @@ -52,10 +52,16 @@ class RestoreFavorites extends React.Component { SettingsActions.addStarMarket(quote, base); } + + notify.addNotification({ + message: counterpart("settings.backup_favorites_success"), + level: "success", + autoDismiss: 2 + }); } render(){ - const { state, props } = this; + const { state } = this; return