Skip to content
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

Implement clear wallet files #1883

Merged
merged 5 commits into from
Mar 21, 2024
Merged

Conversation

gabaldon
Copy link
Contributor

@gabaldon gabaldon commented Mar 12, 2024

close #1868

@gabaldon gabaldon changed the base branch from master to vue3 March 12, 2024 08:55
@gabaldon gabaldon force-pushed the implement-clear-wallet branch 5 times, most recently from db800a5 to 369faa9 Compare March 21, 2024 11:24
@@ -168,6 +173,26 @@ export class WalletManager {
}
}

public clearWalletFiles(pathToClear: string) {
if (fs.existsSync(pathToClear)) {
const items = fs.readdirSync(pathToClear, { withFileTypes: true })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better to delete all files one by one instead of remove the .sheikah directory using fs.rmdirSync. IMO is less prone to error only try to delete once

src/store/wallet.js Outdated Show resolved Hide resolved
@gabaldon gabaldon force-pushed the implement-clear-wallet branch 2 times, most recently from 1a0a039 to 68a5c20 Compare March 21, 2024 14:37
@gabaldon gabaldon merged commit 24cb22c into witnet:vue3 Mar 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants