Skip to content

Commit

Permalink
Set wallet name from file name when restoring fix bitshares#435
Browse files Browse the repository at this point in the history
  • Loading branch information
svk31 committed Sep 21, 2017
1 parent ca7e52c commit 5face6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/components/Wallet/Backup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ class NewWalletName extends Component {
componentWillMount() {
let has_current_wallet = !!this.props.wallet.current_wallet
if( ! has_current_wallet) {
WalletManagerStore.setNewWallet("default")
let walletName = "default";
if (this.props.backup.name) {
walletName = this.props.backup.name.match(/[a-z0-9_-]*/)[0]
}
WalletManagerStore.setNewWallet(walletName)
this.setState({accept: true})
}
if( has_current_wallet && this.props.backup.name && ! this.state.new_wallet) {
Expand Down

0 comments on commit 5face6d

Please sign in to comment.