-
Notifications
You must be signed in to change notification settings - Fork 753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V dai/clear state #1596
V dai/clear state #1596
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small items to tighten up. Otherwise, it looks good.
message: 'You have successfully cleared state.', | ||
title: 'Success!', | ||
}); | ||
const { session } = require('electron'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this is generally ok, we have established a pattern of placing requires at the top of the file using import
. In this case it would be import * as electron from 'electron';
or import { session } from 'electron';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
title: 'Success!', | ||
}); | ||
const { session } = require('electron'); | ||
await new Promise(resolve => session.defaultSession.clearStorageData({}, resolve)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably go in at line 299.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a technical reason the user is notified before the storage data is cleared?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a scenario that @cwhitten requested.
No description provided.