fix for createAccount.
This commit is contained in:
parent
a70b615fd2
commit
3186aaa6cc
@ -866,7 +866,11 @@ WalletDB.prototype.createAccount = function createAccount(options, callback) {
|
||||
if (exists)
|
||||
return callback(new Error('Account already exists.'));
|
||||
|
||||
account = bcoin.account.fromOptions(self, options);
|
||||
try {
|
||||
account = bcoin.account.fromOptions(self, options);
|
||||
} catch (e) {
|
||||
return callback(e);
|
||||
}
|
||||
|
||||
account.init(function(err) {
|
||||
if (err)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user