Skip to content

Commit

Permalink
- wire up new private key import option
Browse files Browse the repository at this point in the history
- add option to wallet management flow as well
- update images
  • Loading branch information
simonmcl committed May 28, 2024
1 parent a45ecb9 commit e3bacc9
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@
"location" : "https://github.com/kukai-wallet/kukai-core-swift",
"state" : {
"branch" : "develop",
"revision" : "3f3702ebaf7c3ed07cc1dd89bdc5b4f5450241fc"
"revision" : "d4c59332acc9d6d32ae45e5d4cbf441a0e9e1b46"
}
},
{
"identity" : "kukai-crypto-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kukai-wallet/kukai-crypto-swift",
"state" : {
"revision" : "203b66175e233ecd2abb7ddb062a49b0301b5616",
"version" : "1.0.22"
"revision" : "757c1975adb830d158eb50afa3776cf2c5eb7245",
"version" : "1.0.23"
}
},
{
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 @@ -53,6 +53,7 @@
"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-invalid-private-key-password"="This private key is encrypted, you must supply the password you used to encryt it";

"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
3 changes: 2 additions & 1 deletion Kukai Mobile/Modules/Home/AddWalletViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class AddWalletViewModel: ViewModel, UITableViewDiffableDataSourceHandler {
],
[
AddCellData(image: UIImage(named: "WalletSocial"), title: "Use Social", subtitle: "Sign in with your preferred social account", isExpandable: false, isTopLevel: false, option: "social"),
AddCellData(image: UIImage(named: "WalletHD"), title: "Restore with Recovery Phrase", subtitle: "Import accounts using your recovery phrase from Kukai or another wallet", isExpandable: false, isTopLevel: false, option: "import"),
AddCellData(image: UIImage(named: "WalletRestore"), title: "Restore with Recovery Phrase", subtitle: "Import accounts using your recovery phrase from Kukai or another wallet", isExpandable: false, isTopLevel: false, option: "import"),
AddCellData(image: UIImage(named: "WalletHD"), title: "Restore with Private Key", subtitle: "Import a wallet from a private key", isExpandable: false, isTopLevel: false, option: "private-key"),
AddCellData(image: UIImage(named: "WalletWatch"), title: "Watch a Tezos Address", subtitle: "Watch a public address or .tez domain", isExpandable: false, isTopLevel: false, option: "watch")
]
]
Expand Down
33 changes: 22 additions & 11 deletions Kukai Mobile/Modules/Home/Base.lproj/Home.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="&lt;heading&gt;" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fxm-nU-LyP">
<rect key="frame" x="39.999999999999993" y="12.666666666666664" width="79.333333333333314" height="30"/>
<rect key="frame" x="39.999999999999993" y="18" width="79.333333333333314" height="19.333333333333329"/>
<fontDescription key="fontDescription" name="Figtree-Bold" family="Figtree" pointSize="16"/>
<color key="textColor" name="Txt10"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XEg-Fn-9q8" customClass="CustomisableButton" customModule="Kukai_Mobile" customModuleProvider="target">
<rect key="frame" x="119.33333333333331" y="12.666666666666664" width="50" height="30"/>
<rect key="frame" x="119.33333333333331" y="18" width="50" height="19.333333333333329"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="NPg-Hh-oA7"/>
</constraints>
Expand Down Expand Up @@ -693,6 +693,7 @@
<segue destination="W3e-f8-FhA" kind="show" identifier="import" id="KEe-L6-pl8"/>
<segue destination="T7z-fZ-ccj" kind="show" identifier="watch" id="9cC-hn-Wwj"/>
<segue destination="jRe-if-wgj" kind="show" identifier="account" id="awb-FO-i1F"/>
<segue destination="a3y-gG-3LD" kind="show" identifier="private-key" id="RS4-PO-Dx0"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="oXg-M0-eCg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
Expand Down Expand Up @@ -788,7 +789,7 @@
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="Hym-l7-6bO">
<rect key="frame" x="16" y="127" width="358" height="455"/>
<rect key="frame" x="16" y="127" width="358" height="443"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="kci-rX-izT">
<rect key="frame" x="0.0" y="0.0" width="358" height="54"/>
Expand Down Expand Up @@ -847,7 +848,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="dIF-1f-QDL">
<rect key="frame" x="0.0" y="70" width="358" height="110.66666666666669"/>
<rect key="frame" x="0.0" y="70" width="358" height="98.666666666666686"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TZZ-Gt-iwb" customClass="CustomisableButton" customModule="Kukai_Mobile" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="105" height="32"/>
Expand All @@ -865,7 +866,7 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XV7-87-nVU" customClass="CustomisableButton" customModule="Kukai_Mobile" customModuleProvider="target">
<rect key="frame" x="0.0" y="81.666666666666686" width="73" height="29"/>
<rect key="frame" x="0.0" y="81.666666666666686" width="79" height="17"/>
<fontDescription key="fontDescription" name="Figtree-SemiBold" family="Figtree" pointSize="14"/>
<color key="tintColor" name="Txt10"/>
<inset key="imageEdgeInsets" minX="17" minY="0.0" maxX="4" maxY="0.0"/>
Expand All @@ -891,7 +892,7 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="Nxk-cJ-RaT">
<rect key="frame" x="0.0" y="196.66666666666669" width="358" height="61"/>
<rect key="frame" x="0.0" y="184.66666666666669" width="358" height="61"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="abB-kP-P9Y" customClass="CustomisableButton" customModule="Kukai_Mobile" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="105" height="32"/>
Expand Down Expand Up @@ -923,7 +924,7 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="dfs-AO-LMR">
<rect key="frame" x="0.0" y="273.66666666666669" width="358" height="181.33333333333331"/>
<rect key="frame" x="0.0" y="261.66666666666669" width="358" height="181.33333333333331"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lJP-hM-7yn">
<rect key="frame" x="0.0" y="0.0" width="358" height="24"/>
Expand Down Expand Up @@ -1578,6 +1579,16 @@
</objects>
<point key="canvasLocation" x="2904" y="-2932"/>
</scene>
<!--private-key-->
<scene sceneID="XR6-03-ZOZ">
<objects>
<viewControllerPlaceholder storyboardName="Onboarding" referencedIdentifier="private-key" id="a3y-gG-3LD" sceneMemberID="viewController">
<navigationItem key="navigationItem" id="dR3-rb-bEw"/>
</viewControllerPlaceholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="qO4-Xp-r6A" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2928" y="-2881"/>
</scene>
<!--Add Account-->
<scene sceneID="NfW-9Z-Rut">
<objects>
Expand Down Expand Up @@ -1758,7 +1769,7 @@
</scenes>
<designables>
<designable name="0Rb-3x-STy">
<size key="intrinsicContentSize" width="24" height="14"/>
<size key="intrinsicContentSize" width="44" height="34"/>
</designable>
<designable name="1un-2s-Olb">
<size key="intrinsicContentSize" width="76" height="36"/>
Expand All @@ -1770,7 +1781,7 @@
<size key="intrinsicContentSize" width="159" height="34"/>
</designable>
<designable name="BXZ-at-zJb">
<size key="intrinsicContentSize" width="24" height="14"/>
<size key="intrinsicContentSize" width="44" height="34"/>
</designable>
<designable name="TQh-in-HjU">
<size key="intrinsicContentSize" width="143.33333333333334" height="34"/>
Expand All @@ -1782,10 +1793,10 @@
<size key="intrinsicContentSize" width="64" height="36"/>
</designable>
<designable name="XEg-Fn-9q8">
<size key="intrinsicContentSize" width="30" height="30"/>
<size key="intrinsicContentSize" width="16" height="18"/>
</designable>
<designable name="XV7-87-nVU">
<size key="intrinsicContentSize" width="73" height="29"/>
<size key="intrinsicContentSize" width="79" height="17"/>
</designable>
<designable name="abB-kP-P9Y">
<size key="intrinsicContentSize" width="105" height="32"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ 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.iconView.image = UIImage(named: "WalletHD")
cell.titleLabel.text = "Import a Private Key"
cell.descriptionLabel.text = "Import a wallet from a private key"

Expand Down
Loading

0 comments on commit e3bacc9

Please sign in to comment.