Skip to content

Commit

Permalink
- create new VC for importing wallets via private keys
Browse files Browse the repository at this point in the history
- wire up basic setup for non-encrypted keys
  • Loading branch information
simonmcl committed May 27, 2024
1 parent 51b8fc7 commit a45ecb9
Show file tree
Hide file tree
Showing 5 changed files with 430 additions and 42 deletions.
4 changes: 4 additions & 0 deletions Kukai Mobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
C06997F12832946B00F6929D /* UITextView+extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06997F02832946B00F6929D /* UITextView+extensions.swift */; };
C06AEDFD2C00997E005CFDAA /* AddAccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06AEDFC2C00997E005CFDAA /* AddAccountViewController.swift */; };
C06AEDFF2C00998D005CFDAA /* AddAccountViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06AEDFE2C00998D005CFDAA /* AddAccountViewModel.swift */; };
C06BA0142C04CC5600FA6EEB /* ImportPrivateKeyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BA0132C04CC5600FA6EEB /* ImportPrivateKeyViewController.swift */; };
C06BC53D2A5EE41B00A0D979 /* SearchResultCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BC53B2A5EE41B00A0D979 /* SearchResultCell.swift */; };
C06BC53E2A5EE41B00A0D979 /* SearchResultCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = C06BC53C2A5EE41B00A0D979 /* SearchResultCell.xib */; };
C06BC5412A5EE50E00A0D979 /* SearchResultsCountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BC53F2A5EE50E00A0D979 /* SearchResultsCountCell.swift */; };
Expand Down Expand Up @@ -613,6 +614,7 @@
C06997F02832946B00F6929D /* UITextView+extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextView+extensions.swift"; sourceTree = "<group>"; };
C06AEDFC2C00997E005CFDAA /* AddAccountViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountViewController.swift; sourceTree = "<group>"; };
C06AEDFE2C00998D005CFDAA /* AddAccountViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountViewModel.swift; sourceTree = "<group>"; };
C06BA0132C04CC5600FA6EEB /* ImportPrivateKeyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImportPrivateKeyViewController.swift; sourceTree = "<group>"; };
C06BC53B2A5EE41B00A0D979 /* SearchResultCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultCell.swift; sourceTree = "<group>"; };
C06BC53C2A5EE41B00A0D979 /* SearchResultCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SearchResultCell.xib; sourceTree = "<group>"; };
C06BC53F2A5EE50E00A0D979 /* SearchResultsCountCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultsCountCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1064,6 +1066,7 @@
C02914372A6589EE00A8AF08 /* ConfirmPasscodeViewController.swift */,
C015F33C29DAEF2600895009 /* AlreadyHaveWalletViewController.swift */,
C0D6C04229DDB93800D890ED /* ImportWalletViewController.swift */,
C06BA0132C04CC5600FA6EEB /* ImportPrivateKeyViewController.swift */,
C0E44BAB2A41FDEE00C2A7C0 /* WatchWalletViewController.swift */,
C0E669F82A5C50C500F7AA25 /* AccountScanningViewController.swift */,
C08FE2392AD4343500327BF9 /* BackupViewController.swift */,
Expand Down Expand Up @@ -2064,6 +2067,7 @@
C049B5B926A084A500F1C5E0 /* UIView+extensions.swift in Sources */,
C008D4132A979B5B000B4503 /* AccountButtonCell.swift in Sources */,
C0DB48172785C6DD00D3B4F9 /* FadeSegue.swift in Sources */,
C06BA0142C04CC5600FA6EEB /* ImportPrivateKeyViewController.swift in Sources */,
C0FBC893292C162000B29921 /* HiddenBalancesViewModel.swift in Sources */,
C04E286A293F950900DC4171 /* TokenDetailsActivityHeaderCell.swift in Sources */,
C06E0D61287C3E28007A580B /* WalletConnectViewModel.swift in Sources */,
Expand Down
1 change: 1 addition & 0 deletions Kukai Mobile/Localization/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"error-onramp-generic"="Unable to access this provider at this time, please try again later";
"error-fetching-domains"="Encountered an error checking for tezos domains";
"error-unsupported-wallet-type"="This type of wallet doesn't support this feature";
"error-invalid-private-key"="Invalid private key. Please check you have the correct details and try again";

"error-funds-body-wc2"="Balance for address %@, is %@ and the required balance to pay for this transaction is %@";
"error-unknwon-wc2"="Unable to respond to Wallet Connect";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AlreadyHaveWalletViewController: UIViewController, UITableViewDelegate, UI
}

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
return 4
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
Expand All @@ -44,12 +44,17 @@ class AlreadyHaveWalletViewController: UIViewController, UITableViewDelegate, UI
cell.descriptionLabel.text = "Import accounts using your recovery phrase from Kukai or another wallet"

case 2:
cell.iconView.image = UIImage(named: "WalletRestore")
cell.titleLabel.text = "Import a Private Key"
cell.descriptionLabel.text = "Import a wallet from a private key"

case 3:
cell.iconView.image = UIImage(named: "WalletWatch")
cell.titleLabel.text = "Watch a Tezos Address"
cell.descriptionLabel.text = "Watch a public address or .tez domain"

/*
case 3:
case 4:
cell.iconView.image = UIImage(named: "WalletLedger")
cell.titleLabel.text = "Connect with Ledger"
cell.descriptionLabel.text = "Add accounts from your Bluetooth hardware wallet"
Expand Down Expand Up @@ -79,12 +84,15 @@ class AlreadyHaveWalletViewController: UIViewController, UITableViewDelegate, UI

case 1:
self.performSegue(withIdentifier: "phrase", sender: nil)

case 2:
self.performSegue(withIdentifier: "private-key", sender: nil)

case 3:
self.performSegue(withIdentifier: "watch", sender: nil)

/*
case 3:
case 4:
self.alert(withTitle: "Under Construction", andMessage: "coming soon")
*/

Expand Down
Loading

0 comments on commit a45ecb9

Please sign in to comment.