Skip to content

Commit

Permalink
Avoid triggering error invalid address
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Scoff committed Jan 12, 2018
1 parent 42c520d commit 2f8190f
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,6 @@ class ImportWalletViewController: FormViewController {

displayLoading(text: NSLocalizedString("importWallet.importingIndicator.label.title", value: "Importing wallet...", comment: ""), animated: false)

guard let address = Address(string: watchInput) else {
return displayError(error: AddressError.invalidAddress)
}

let type = ImportSelectionType(title: segmentRow?.value)
let importType: ImportType = {
switch type {
Expand All @@ -199,6 +195,7 @@ class ImportWalletViewController: FormViewController {
case .mnemonic:
return .mnemonic(words: words, password: password)
case .watch:
let address = Address(string: watchInput)! // Address validated by form view.
return .watch(address: address)
}
}()
Expand Down

0 comments on commit 2f8190f

Please sign in to comment.