Skip to content

Commit

Permalink
Merge pull request #106 from lightninglabs/fix-persisted-credentials
Browse files Browse the repository at this point in the history
Do not delete persisted credentials when memoryOnly is used
  • Loading branch information
jamaljsr authored Feb 12, 2024
2 parents 4bf81b5 + c2ac309 commit b7dce83
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/util/credentialStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,17 @@ export default class LncCredentialStore implements CredentialStore {
if (!memoryOnly) {
const key = `${STORAGE_KEY}:${this.namespace}`;
localStorage.removeItem(key);

this.persisted = {
salt: '',
cipher: '',
serverHost: this.persisted.serverHost,
localKey: '',
remoteKey: '',
pairingPhrase: ''
};
}
this.persisted = {
salt: '',
cipher: '',
serverHost: this.persisted.serverHost,
localKey: '',
remoteKey: '',
pairingPhrase: ''
};

this._localKey = '';
this._remoteKey = '';
this._pairingPhrase = '';
Expand Down

0 comments on commit b7dce83

Please sign in to comment.