Skip to content

Commit

Permalink
Disable mnemonic phrase.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Scoff committed Jan 9, 2018
1 parent 29a33d4 commit af0aabe
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ post_install do |installer|
end
end
end

2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ SPEC CHECKSUMS:
TrustKeystore: 2c62775c98df86b7e2ef78c059581a4e8c98a054
VENTouchLock: 20d378b9c6173e2c054448aeb3fb2f40822a9f3f

PODFILE CHECKSUM: 763570d7b40ec2dbd7a197a827a33457f8805e23
PODFILE CHECKSUM: f7a245b43f9da8021491b9d8b07045cb9bfa64df

COCOAPODS: 1.3.1
9 changes: 4 additions & 5 deletions Trust/EtherClient/EtherKeystore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ open class EtherKeystore: Keystore {
completion(.failure(error))
}
}
case .mnemonic(let words):
guard let privateKey = Mnemonic.decode(words: words) else {
return completion(.failure(KeystoreError.failedToImportPrivateKey))
}
keystore(for: privateKey, password: newPassword) { result in
case .mnemonic(let words, let password):
let key = ""
// TODO: Implement it
keystore(for: key, password: newPassword) { result in
switch result {
case .success(let value):
self.importKeystore(
Expand Down
2 changes: 1 addition & 1 deletion Trust/EtherClient/ImportType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import TrustKeystore
enum ImportType {
case keystore(string: String, password: String)
case privateKey(privateKey: String)
case mnemonic(words: [String])
case mnemonic(words: [String], password: String)
case watch(address: Address)
}
4 changes: 2 additions & 2 deletions Trust/Wallet/ViewControllers/ImportWalletViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class ImportWalletViewController: FormViewController {

<<< SegmentedRow<String>(Values.segment) {
$0.options = [
ImportSelectionType.mnemonic.title,
//ImportSelectionType.mnemonic.title,
ImportSelectionType.keystore.title,
ImportSelectionType.privateKey.title,
ImportSelectionType.watch.title,
Expand Down Expand Up @@ -193,7 +193,7 @@ class ImportWalletViewController: FormViewController {
case .privateKey:
return .privateKey(privateKey: privateKeyInput)
case .mnemonic:
return .mnemonic(words: words)
return .mnemonic(words: words, password: password)
case .watch:
return .watch(address: Address(string: watchInput))
}
Expand Down

0 comments on commit af0aabe

Please sign in to comment.