From 0ca856863e3a88fd06a783ea1538ecae4517b807 Mon Sep 17 00:00:00 2001 From: Johann Og Date: Tue, 23 Aug 2016 12:17:46 +0200 Subject: [PATCH] Change from 4 words to 8 words validation --- src/Setup.iced | 8 ++------ src/Vault.iced | 7 +++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/Setup.iced b/src/Setup.iced index cbdef92..7808024 100644 --- a/src/Setup.iced +++ b/src/Setup.iced @@ -50,9 +50,6 @@ class Configure @localStorage.setItem 'watcher_pub_key', watcher_pub_key @localStorage.setItem 'vault', answers.vault - - - # test await new Crypto watcher_priv_key, null, defer cryptoBox watcherFP = cryptoBox.watcherKey.get_pgp_fingerprint().toString('hex') @@ -66,7 +63,7 @@ class Configure @done = true @alert "Now install Trailbot Client in your computer and start the setup wizard." , true - @alert "Then you will be required to enter these 4 words:" + @alert "The following 8 words will be required by the Trailbot Client:" @alert "#{sentence}".cyan.bold, true await new Vault this, answers.vault, watcherFP, defer vault @@ -77,7 +74,6 @@ class Configure process.exit 0 unless change if change && change.client @localStorage.setItem 'client_pub_key', change.client - console.log "remove id",change.id vault.remove 'exchange', [change], (res) => console.log "file deleted" @@ -105,7 +101,7 @@ class Configure generateChannel : () => word = Math.random().toString(36).substring(2) - crypto.createHash('md5').update(word).digest("hex").substr(0, 8) + crypto.createHash('md5').update(word).digest("hex").substr(0, 16) getExpirationDate : () => now = new Date() diff --git a/src/Vault.iced b/src/Vault.iced index bf0579a..56bd775 100644 --- a/src/Vault.iced +++ b/src/Vault.iced @@ -39,14 +39,13 @@ class Vault else 'anonymous' - save : (col, object, cb) -> + save : (col, object) -> console.log "Saving into #{col}" if @app.emit console.log 'SAVING', object if @app.emit this[col]?.store object - cb and cb true replace : (col, object) -> - console.log "Replacing into #{col}" + console.log "Replacing into #{col}" if @app.emit this[col]?.replace object get : (col, query, cb) -> @@ -56,7 +55,7 @@ class Vault this[col]?.find(query).watch().subscribe(cb, err) remove : (col, ids) -> - console.log "Removing from #{col}" + console.log "Removing from #{col}" if @app.emit this[col].removeAll(ids)