Skip to content

Commit

Permalink
Made wipe remove v-data cookies.
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Swindell <tom@zippie.org>
  • Loading branch information
Tom Swindell authored and Tom Swindell committed Apr 11, 2019
1 parent d9f1caa commit e8ad7e1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/root_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/
import secp256k1 from 'secp256k1'
import bs58 from 'bs58'
import Cookie from 'js-cookie'
import { decrypt } from '../utils'

/**
Expand Down Expand Up @@ -56,6 +57,11 @@ export default class {
// https://vault.zippie.org/#?wipe
if ('wipe' in this.vault.params && confirm('Do you really want to wipe Zippie Vault? This may cause data or money loss.') === true) {
this.vault.store.clear()

Object.keys(Cookie.get())
.filter(k => k.startsWith('v-data-'))
.forEach(k => Cookie.remove(k))

return
}

Expand Down

0 comments on commit e8ad7e1

Please sign in to comment.