Skip to content

Commit

Permalink
Do not save seed for restored wallets (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
beansgum authored May 22, 2020
1 parent 48002a6 commit b5aae4a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions multiwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,17 +302,11 @@ func (mw *MultiWallet) CreateNewWallet(walletName, privatePassphrase string, pri

func (mw *MultiWallet) RestoreWallet(walletName, seedMnemonic, privatePassphrase string, privatePassphraseType int32) (*Wallet, error) {

encryptedSeed, err := encryptWalletSeed([]byte(privatePassphrase), seedMnemonic)
if err != nil {
return nil, err
}

wallet := &Wallet{
Name: walletName,
PrivatePassphraseType: privatePassphraseType,
IsRestored: true,
HasDiscoveredAccounts: false,
EncryptedSeed: encryptedSeed,
}

return mw.saveNewWallet(wallet, func() error {
Expand Down

0 comments on commit b5aae4a

Please sign in to comment.