settings: it works
This commit is contained in:
parent
a048f8eed5
commit
3effa3d0b1
2 changed files with 33 additions and 19 deletions
|
|
@ -112,6 +112,21 @@ Wallet.builderOpts = {
|
|||
feeSat: undefined,
|
||||
};
|
||||
|
||||
/**
|
||||
* @desc static list with persisted properties of a wallet.
|
||||
* These are the properties that get stored/read from localstorage
|
||||
*/
|
||||
Wallet.PERSISTED_PROPERTIES = [
|
||||
'opts',
|
||||
'settings',
|
||||
'publicKeyRing',
|
||||
'txProposals',
|
||||
'privateKey',
|
||||
'addressBook',
|
||||
'backupOffered',
|
||||
'lastTimestamp',
|
||||
];
|
||||
|
||||
/**
|
||||
* @desc Retrieve a random id for the wallet
|
||||
* @TODO: Discuss changing to a UUID
|
||||
|
|
@ -175,6 +190,7 @@ Wallet.prototype._onIndexes = function(senderId, data) {
|
|||
Wallet.prototype.changeSettings = function(settings) {
|
||||
console.log(settings);
|
||||
this.settings = settings;
|
||||
this.store();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -818,6 +834,8 @@ Wallet.prototype.toObj = function() {
|
|||
addressBook: this.addressBook,
|
||||
lastTimestamp: this.lastTimestamp,
|
||||
};
|
||||
console.dir(walletObj);
|
||||
console.trace();
|
||||
|
||||
return walletObj;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue