fix for createAccount.

This commit is contained in:
Christopher Jeffrey 2016-07-16 15:51:49 -07:00
parent a70b615fd2
commit 3186aaa6cc
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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)