Merge pull request #1827 from matiaspando/feature/checkProfile
Add error checking when importing a wallet from a corrupt file
This commit is contained in:
commit
27ff17c86e
1 changed files with 5 additions and 1 deletions
|
|
@ -1035,8 +1035,12 @@ Wallet.fromObj = function(o, readOpts) {
|
||||||
// TODO Why moving everything to opts. This needs refactoring.
|
// TODO Why moving everything to opts. This needs refactoring.
|
||||||
//
|
//
|
||||||
// clone opts
|
// clone opts
|
||||||
var opts = JSON.parse(JSON.stringify(o.opts));
|
|
||||||
|
|
||||||
|
if (!o.opts) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var opts = JSON.parse(JSON.stringify(o.opts));
|
||||||
opts.addressBook = o.addressBook;
|
opts.addressBook = o.addressBook;
|
||||||
opts.settings = o.settings;
|
opts.settings = o.settings;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue