diff --git a/ConcordiumWallet.xcodeproj/project.pbxproj b/ConcordiumWallet.xcodeproj/project.pbxproj index 9fad05f8..0247df69 100644 --- a/ConcordiumWallet.xcodeproj/project.pbxproj +++ b/ConcordiumWallet.xcodeproj/project.pbxproj @@ -632,6 +632,14 @@ 5088BABB2C6CA2030056CFD0 /* TermsAndConditionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BAB92C6CA2030056CFD0 /* TermsAndConditionsView.swift */; }; 5088BABC2C6CA2030056CFD0 /* TermsAndConditionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BAB92C6CA2030056CFD0 /* TermsAndConditionsView.swift */; }; 5088BABD2C6CA2030056CFD0 /* TermsAndConditionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BAB92C6CA2030056CFD0 /* TermsAndConditionsView.swift */; }; + 5088BAC02C91EF7D0056CFD0 /* RevealPrivateKeyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BABF2C91EF7D0056CFD0 /* RevealPrivateKeyView.swift */; }; + 5088BAC12C91EF7D0056CFD0 /* RevealPrivateKeyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BABF2C91EF7D0056CFD0 /* RevealPrivateKeyView.swift */; }; + 5088BAC22C91EF7D0056CFD0 /* RevealPrivateKeyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BABF2C91EF7D0056CFD0 /* RevealPrivateKeyView.swift */; }; + 5088BAC32C91EF7D0056CFD0 /* RevealPrivateKeyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BABF2C91EF7D0056CFD0 /* RevealPrivateKeyView.swift */; }; + 5088BAC62C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BAC52C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift */; }; + 5088BAC72C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BAC52C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift */; }; + 5088BAC82C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BAC52C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift */; }; + 5088BAC92C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5088BAC52C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift */; }; 509749C42C19A0BA00D28D6B /* UnshiedSunsetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 509749C32C19A0BA00D28D6B /* UnshiedSunsetView.swift */; }; 509749C52C19A0BA00D28D6B /* UnshiedSunsetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 509749C32C19A0BA00D28D6B /* UnshiedSunsetView.swift */; }; 509749C62C19A0BA00D28D6B /* UnshiedSunsetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 509749C32C19A0BA00D28D6B /* UnshiedSunsetView.swift */; }; @@ -3066,6 +3074,8 @@ 19C2EFED051EE58467949EAA /* AddRecipientPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddRecipientPresenter.swift; sourceTree = ""; }; 19C2EFF2620E0CD7DECE642A /* ChoiceArData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChoiceArData.swift; sourceTree = ""; }; 5088BAB92C6CA2030056CFD0 /* TermsAndConditionsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TermsAndConditionsView.swift; sourceTree = ""; }; + 5088BABF2C91EF7D0056CFD0 /* RevealPrivateKeyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RevealPrivateKeyView.swift; sourceTree = ""; }; + 5088BAC52C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIRequestPasswordDelegate.swift; sourceTree = ""; }; 509749C32C19A0BA00D28D6B /* UnshiedSunsetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnshiedSunsetView.swift; sourceTree = ""; }; 50F8F98A2C620FCC004447CA /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; 52055F762552B83D0071F7CA /* IdentityCardView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IdentityCardView.xib; sourceTree = ""; }; @@ -4327,6 +4337,22 @@ path = Network; sourceTree = ""; }; + 5088BABE2C91EF620056CFD0 /* RevealPrivateKey */ = { + isa = PBXGroup; + children = ( + 5088BABF2C91EF7D0056CFD0 /* RevealPrivateKeyView.swift */, + ); + path = RevealPrivateKey; + sourceTree = ""; + }; + 5088BAC42C921B440056CFD0 /* RequestPasswordDelegate */ = { + isa = PBXGroup; + children = ( + 5088BAC52C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift */, + ); + path = RequestPasswordDelegate; + sourceTree = ""; + }; 509749C22C199B7400D28D6B /* UnshiedSunset */ = { isa = PBXGroup; children = ( @@ -4939,6 +4965,8 @@ 7FF07AE323EAE09B00F1FC04 /* Views */ = { isa = PBXGroup; children = ( + 5088BAC42C921B440056CFD0 /* RequestPasswordDelegate */, + 5088BABE2C91EF620056CFD0 /* RevealPrivateKey */, 509749C22C199B7400D28D6B /* UnshiedSunset */, 0111D7212A2DFE7000E05D35 /* WalletConnect */, 19C2E50D27878D62320AE14B /* ScanQR */, @@ -6733,6 +6761,7 @@ 89B34A292892B6B10059891C /* RecoveryPhraseInputPresenter.swift in Sources */, 7F48C27D244E17D100997684 /* SubmissionStatus.swift in Sources */, 01AB17DE2AA1F5F50078237F /* SendFundTokenSelection.swift in Sources */, + 5088BAC62C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift in Sources */, C94ED728246302160071A4FB /* TransactionDetailInfoCellView.swift in Sources */, 01A91AAB2A8E7D9C00735D23 /* CIS2TokensMetadataItem.swift in Sources */, 078967082742F0890031EA9F /* KeyboardDismissableBaseViewController.swift in Sources */, @@ -6772,6 +6801,7 @@ 52A6A77E24F909CD00138D83 /* IDObjectRequestWrapper.swift in Sources */, 7F48C1DC244DCD0B00997684 /* IdentityConfirmedViewController.swift in Sources */, 7F48C274244E17D100997684 /* MakeCreateTransferRequest.swift in Sources */, + 5088BAC02C91EF7D0056CFD0 /* RevealPrivateKeyView.swift in Sources */, 891B19D328A3819700F4B0D6 /* SubmitSeedAccountPresenter.swift in Sources */, 89D46871289D21D2007D3FC8 /* SeedIdentityStatusView.swift in Sources */, 527DE350257378DC00333E65 /* ReleaseScheduleCell.swift in Sources */, @@ -7030,6 +7060,7 @@ FA0CAAED2934ECE40009D5F8 /* UserDefaultsQueue.swift in Sources */, 7F85B6FB246A9A7C00ED09B8 /* KeychainWrapper.swift in Sources */, 7F85B6FC246A9A7C00ED09B8 /* MenuItemCellView.swift in Sources */, + 5088BAC82C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift in Sources */, 64DB66D325DE6A1300F4C605 /* AboutViewController.swift in Sources */, 070D625F27B3DF0500B6903C /* OnboardingCarouselWebContentViewController.swift in Sources */, 7F85B6FE246A9A7C00ED09B8 /* UIButton+StoryboardLocalization.swift in Sources */, @@ -7418,6 +7449,7 @@ CD3E4A912A5588D700D7FBF3 /* SignMessagePayload.swift in Sources */, 7FF9191E2511505C00B1032B /* ImportViewController.swift in Sources */, 509749C62C19A0BA00D28D6B /* UnshiedSunsetView.swift in Sources */, + 5088BAC22C91EF7D0056CFD0 /* RevealPrivateKeyView.swift in Sources */, 7F85B7B1246A9A7C00ED09B8 /* TransactionDetailInfoCellView.swift in Sources */, 7F85B7B2246A9A7C00ED09B8 /* TransactionsLoadingHandler.swift in Sources */, 89D46844289BF99C007D3FC8 /* SeedIDRequest.swift in Sources */, @@ -7624,6 +7656,7 @@ FA0CAAEE2934ECE40009D5F8 /* UserDefaultsQueue.swift in Sources */, 7F85B7F9246A9AB600ED09B8 /* Origin.swift in Sources */, 7F85B7FA246A9AB600ED09B8 /* KeychainWrapper.swift in Sources */, + 5088BAC92C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift in Sources */, 64DB66D425DE6A1300F4C605 /* AboutViewController.swift in Sources */, 070D626027B3DF0500B6903C /* OnboardingCarouselWebContentViewController.swift in Sources */, 7F85B7FB246A9AB600ED09B8 /* MenuItemCellView.swift in Sources */, @@ -8012,6 +8045,7 @@ CD3E4A922A5588D700D7FBF3 /* SignMessagePayload.swift in Sources */, 7FF9191F2511505C00B1032B /* ImportViewController.swift in Sources */, 509749C72C19A0BA00D28D6B /* UnshiedSunsetView.swift in Sources */, + 5088BAC32C91EF7D0056CFD0 /* RevealPrivateKeyView.swift in Sources */, 7F85B8AE246A9AB600ED09B8 /* AccountDetailsPresenter.swift in Sources */, 7F85B8AF246A9AB600ED09B8 /* TransactionViewModel.swift in Sources */, 89D46845289BF99C007D3FC8 /* SeedIDRequest.swift in Sources */, @@ -8352,6 +8386,7 @@ 7FEB7BEF2409111400D3E0EC /* PreIdentityObject.swift in Sources */, 89D467C3289AAD4A007D3FC8 /* PrivateIDObjectData.swift in Sources */, C938F531241E789A00ECAD47 /* CreateAccountCoordinator.swift in Sources */, + 5088BAC72C921B670056CFD0 /* SwiftUIRequestPasswordDelegate.swift in Sources */, C9BB9FE12444AB3900AE0884 /* GeneralFormatter.swift in Sources */, 89D46801289BA089007D3FC8 /* SeedMobileWallet.swift in Sources */, 01145A3E2B03A4F8008331F5 /* Double+Rounding.swift in Sources */, @@ -8643,6 +8678,7 @@ 01CFC6AC2A43308C007F9747 /* ContractUpdatePayloadEntity.swift in Sources */, 19C2E0C5C3B047A2DC0D44D7 /* AccountDetailsPresenter.swift in Sources */, 89D46818289BC9DC007D3FC8 /* OnboardingCarouselView.swift in Sources */, + 5088BAC12C91EF7D0056CFD0 /* RevealPrivateKeyView.swift in Sources */, 19C2E0045F94FFFE728C6603 /* TransactionViewModel.swift in Sources */, C94ED727246302160071A4FB /* TransactionDetailInfoCellView.swift in Sources */, 19C2E2E6817B5D3C16E135CE /* TransactionsLoadingHandler.swift in Sources */, @@ -8854,7 +8890,7 @@ "$(PROJECT_DIR)", "$(PROJECT_DIR)/Dependencies", ); - MARKETING_VERSION = 1.5.1; + MARKETING_VERSION = 1.5.2; MOCK = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -DMOCK"; PRODUCT_BUNDLE_IDENTIFIER = software.concordium.mobilewallet.seedphrase.mocked; @@ -8887,7 +8923,7 @@ "$(PROJECT_DIR)", "$(PROJECT_DIR)/Dependencies", ); - MARKETING_VERSION = 1.5.1; + MARKETING_VERSION = 1.5.2; MOCK = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -DMOCK"; PRODUCT_BUNDLE_IDENTIFIER = software.concordium.mobilewallet.seedphrase.mocked; @@ -8905,11 +8941,9 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "ConcordiumWallet/Resources/Entitlements/Concordium ID.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 64; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = K762RM4LQ3; + DEVELOPMENT_TEAM = K762RM4LQ3; ENABLE_BITCODE = NO; INFOPLIST_FILE = "ConcordiumWallet/Resources/ConcordiumWalletTestNet-Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "TestNet Seed Phrase Wallet"; @@ -8923,12 +8957,11 @@ "$(PROJECT_DIR)", "$(PROJECT_DIR)/Dependencies", ); - MARKETING_VERSION = 1.5.1; + MARKETING_VERSION = 1.5.2; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -DTESTNET"; PRODUCT_BUNDLE_IDENTIFIER = software.concordium.mobilewallet.seedphrase.testnet; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore software.concordium.mobilewallet.seedphrase.testnet"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG ENABLE_GTU_DROP"; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/ConcordiumWallet-Briding-Header-File.h"; SWIFT_VERSION = 5.0; @@ -8943,11 +8976,9 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "ConcordiumWallet/Resources/Entitlements/Concordium ID.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 64; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = K762RM4LQ3; + DEVELOPMENT_TEAM = K762RM4LQ3; ENABLE_BITCODE = NO; INFOPLIST_FILE = "ConcordiumWallet/Resources/ConcordiumWalletTestNet-Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "TestNet Seed Phrase Wallet"; @@ -8961,12 +8992,11 @@ "$(PROJECT_DIR)", "$(PROJECT_DIR)/Dependencies", ); - MARKETING_VERSION = 1.5.1; + MARKETING_VERSION = 1.5.2; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -DTESTNET"; PRODUCT_BUNDLE_IDENTIFIER = software.concordium.mobilewallet.seedphrase.testnet; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore software.concordium.mobilewallet.seedphrase.testnet"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = ENABLE_GTU_DROP; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/ConcordiumWallet-Briding-Header-File.h"; SWIFT_VERSION = 5.0; @@ -8997,7 +9027,7 @@ "$(PROJECT_DIR)", "$(PROJECT_DIR)/Dependencies", ); - MARKETING_VERSION = 1.5.1; + MARKETING_VERSION = 1.5.2; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -DMAINNET"; PRODUCT_BUNDLE_IDENTIFIER = software.concordium.mobilewallet.seedphrase.mainnet; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -9033,7 +9063,7 @@ "$(PROJECT_DIR)", "$(PROJECT_DIR)/Dependencies", ); - MARKETING_VERSION = 1.5.1; + MARKETING_VERSION = 1.5.2; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -DMAINNET"; PRODUCT_BUNDLE_IDENTIFIER = software.concordium.mobilewallet.seedphrase.mainnet; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -9187,7 +9217,7 @@ "$(PROJECT_DIR)", "$(PROJECT_DIR)/Dependencies", ); - MARKETING_VERSION = 1.5.1; + MARKETING_VERSION = 1.5.2; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -DSTAGINGNET"; PRODUCT_BUNDLE_IDENTIFIER = software.concordium.mobilewallet.seedphrase.stagenet; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -9222,7 +9252,7 @@ "$(PROJECT_DIR)", "$(PROJECT_DIR)/Dependencies", ); - MARKETING_VERSION = 1.5.1; + MARKETING_VERSION = 1.5.2; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -DSTAGINGNET"; PRODUCT_BUNDLE_IDENTIFIER = software.concordium.mobilewallet.seedphrase.stagenet; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/ConcordiumWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ConcordiumWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..0cf92ae6 --- /dev/null +++ b/ConcordiumWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,150 @@ +{ + "originHash" : "06ce748ca616ce913f1f54d3edabe35c86d6b8a020d222ae86472feb433d8e60", + "pins" : [ + { + "identity" : "bigint", + "kind" : "remoteSourceControl", + "location" : "https://github.com/attaswift/BigInt.git", + "state" : { + "revision" : "0ed110f7555c34ff468e72e1686e59721f2b0da6", + "version" : "5.3.0" + } + }, + { + "identity" : "concordium-wallet-crypto-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Concordium/concordium-wallet-crypto-swift", + "state" : { + "revision" : "f7728a5274aae63e1bd5204ba455dfaf740f57a9", + "version" : "0.24.0-0" + } + }, + { + "identity" : "matomo-sdk-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/matomo-org/matomo-sdk-ios.git", + "state" : { + "revision" : "15a645e11eaa8053f93749d73ced03da1e56fd01", + "version" : "7.5.2" + } + }, + { + "identity" : "mnemonicswift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/zcash-hackworks/MnemonicSwift", + "state" : { + "revision" : "716a2c32ac2bbd8a1499ac834077df42b75edc85", + "version" : "2.2.4" + } + }, + { + "identity" : "qrcode", + "kind" : "remoteSourceControl", + "location" : "https://github.com/WalletConnect/QRCode", + "state" : { + "revision" : "263f280d2c8144adfb0b6676109846cfc8dd552b", + "version" : "14.3.1" + } + }, + { + "identity" : "realm-core", + "kind" : "remoteSourceControl", + "location" : "https://github.com/realm/realm-core.git", + "state" : { + "revision" : "f1e962cd447f8b69f8f7cf46a188b1c6246923c5", + "version" : "13.17.0" + } + }, + { + "identity" : "realm-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/realm/realm-swift", + "state" : { + "revision" : "0155caac1a0830a9fbaaffe5866b909fad3a6fc4", + "version" : "10.41.1" + } + }, + { + "identity" : "sdwebimage", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImage.git", + "state" : { + "revision" : "f6afa0132961d593f07970d84e2d8b588c29ea04", + "version" : "5.19.1" + } + }, + { + "identity" : "sdwebimagesvgcoder", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImageSVGCoder.git", + "state" : { + "revision" : "950167445ab703740569869c8b7510efc9d09a26", + "version" : "1.7.0" + } + }, + { + "identity" : "sdwebimageswiftui", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImageSwiftUI.git", + "state" : { + "revision" : "b7af5e6bd9c2987e41730400d1baad13d74a141a", + "version" : "3.0.4" + } + }, + { + "identity" : "starscream", + "kind" : "remoteSourceControl", + "location" : "https://github.com/daltoniam/Starscream.git", + "state" : { + "revision" : "a063fda2b8145a231953c20e7a646be254365396", + "version" : "3.1.2" + } + }, + { + "identity" : "swift-crypto", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-crypto.git", + "state" : { + "revision" : "60f13f60c4d093691934dc6cfdf5f508ada1f894", + "version" : "2.6.0" + } + }, + { + "identity" : "swift-qrcode-generator", + "kind" : "remoteSourceControl", + "location" : "https://github.com/dagronf/swift-qrcode-generator", + "state" : { + "revision" : "5ca09b6a2ad190f94aa3d6ddef45b187f8c0343b", + "version" : "1.0.3" + } + }, + { + "identity" : "swiftcbor", + "kind" : "remoteSourceControl", + "location" : "https://github.com/unrelentingtech/SwiftCBOR", + "state" : { + "revision" : "418dab41b09a5da0d45d7b788c59085979ff4dae", + "version" : "0.4.7" + } + }, + { + "identity" : "swiftimagereadwrite", + "kind" : "remoteSourceControl", + "location" : "https://github.com/dagronf/SwiftImageReadWrite", + "state" : { + "revision" : "5596407d1cf61b953b8e658fa8636a471df3c509", + "version" : "1.1.6" + } + }, + { + "identity" : "walletconnectswiftv2", + "kind" : "remoteSourceControl", + "location" : "https://github.com/WalletConnect/WalletConnectSwiftV2.git", + "state" : { + "revision" : "84b09a13b48d08f1092a7494e2ad70cbb92545c2", + "version" : "1.6.11" + } + } + ], + "version" : 3 +} diff --git a/ConcordiumWallet/Extensions/UIApplication+Helper.swift b/ConcordiumWallet/Extensions/UIApplication+Helper.swift index ed4f22e0..5affb63f 100644 --- a/ConcordiumWallet/Extensions/UIApplication+Helper.swift +++ b/ConcordiumWallet/Extensions/UIApplication+Helper.swift @@ -16,3 +16,10 @@ extension UIApplication { } } } + + +extension UIApplication { + func topMostViewController() -> UIViewController? { + return self.keyWindow?.rootViewController?.topMostViewController() + } +} diff --git a/ConcordiumWallet/Extensions/UIViewController+Helper.swift b/ConcordiumWallet/Extensions/UIViewController+Helper.swift index 92889205..280fd77a 100644 --- a/ConcordiumWallet/Extensions/UIViewController+Helper.swift +++ b/ConcordiumWallet/Extensions/UIViewController+Helper.swift @@ -228,3 +228,21 @@ extension UIViewController { present(alert, animated: true, completion: nil) } } + +extension UIViewController { + func topMostViewController() -> UIViewController { + if self.presentedViewController == nil { + return self + } + if let navigation = self.presentedViewController as? UINavigationController { + return (navigation.visibleViewController?.topMostViewController())! + } + if let tab = self.presentedViewController as? UITabBarController { + if let selectedTab = tab.selectedViewController { + return selectedTab.topMostViewController() + } + return tab.topMostViewController() + } + return self.presentedViewController!.topMostViewController() + } +} diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/Contents.json b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/Contents.json new file mode 100644 index 00000000..1a4b7a31 --- /dev/null +++ b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ic 24.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ic 24@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ic 24@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24.png b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24.png new file mode 100644 index 00000000..a17dc943 Binary files /dev/null and b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24.png differ diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24@2x.png b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24@2x.png new file mode 100644 index 00000000..5ef55482 Binary files /dev/null and b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24@2x.png differ diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24@3x.png b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24@3x.png new file mode 100644 index 00000000..4f4f5d91 Binary files /dev/null and b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24@3x.png differ diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Contents.json b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Contents.json new file mode 100644 index 00000000..e187dfc7 --- /dev/null +++ b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Eye.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Eye@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Eye@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye.png b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye.png new file mode 100644 index 00000000..dff74c5f Binary files /dev/null and b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye.png differ diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye@2x.png b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye@2x.png new file mode 100644 index 00000000..d10ada72 Binary files /dev/null and b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye@2x.png differ diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye@3x.png b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye@3x.png new file mode 100644 index 00000000..721767b9 Binary files /dev/null and b/ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye@3x.png differ diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Contents.json b/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Contents.json new file mode 100644 index 00000000..9bcb3f22 --- /dev/null +++ b/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Lock.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Lock@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Lock@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock.png b/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock.png new file mode 100644 index 00000000..1506c7bd Binary files /dev/null and b/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock.png differ diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock@2x.png b/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock@2x.png new file mode 100644 index 00000000..c8e64582 Binary files /dev/null and b/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock@2x.png differ diff --git a/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock@3x.png b/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock@3x.png new file mode 100644 index 00000000..61921e91 Binary files /dev/null and b/ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock@3x.png differ diff --git a/ConcordiumWallet/Resources/ConcordiumWallet/Base.lproj/Localizable.strings b/ConcordiumWallet/Resources/ConcordiumWallet/Base.lproj/Localizable.strings index 9f32be01..973d5b36 100644 --- a/ConcordiumWallet/Resources/ConcordiumWallet/Base.lproj/Localizable.strings +++ b/ConcordiumWallet/Resources/ConcordiumWallet/Base.lproj/Localizable.strings @@ -433,6 +433,7 @@ If you don’t have enough CCD at disposal on your balance, you might not be abl "more.update.error.nonFinalizedItems" = "All identities and accounts must be finalized before passcode can be changed. Please wait, then try again. If you have any failed identities, these must also be deleted first."; "more.updatePasswordAndBiometrics.infoText" = "By pressing Continue, you will be guided through setting up a new passcode. You will also get the option of enabling biometrics, or to continue without them."; "more.recovery" = "Recovery"; +"more.private.key" = "Wallet private key"; "more.validateIdsAndAccount.warningTitle" = "⚠️ Warning ⚠️"; //"more.validateIdsAndAccount.unusableIdentitiesFound" = "The keys for the following identities and accounts could not be found. Without the keys the identities and accounts cannot function. How would you like to proceed?\n"; "more.validateIdsAndAccount.removeFromApp" = "Remove from app"; diff --git a/ConcordiumWallet/Views/MoreSection/MoreCoordinator.swift b/ConcordiumWallet/Views/MoreSection/MoreCoordinator.swift index 69306f9e..60a57525 100644 --- a/ConcordiumWallet/Views/MoreSection/MoreCoordinator.swift +++ b/ConcordiumWallet/Views/MoreSection/MoreCoordinator.swift @@ -6,6 +6,7 @@ import Combine import Foundation import UIKit +import SwiftUI protocol MoreCoordinatorDelegate: IdentitiesCoordinatorDelegate { } @@ -124,6 +125,11 @@ class MoreCoordinator: Coordinator, ShowAlert, MoreCoordinatorDelegate { } extension MoreCoordinator: MoreMenuPresenterDelegate { + func userShowPrivateKey() { + let view = RevealPrivateKeyView(viewModel: RevealPrivateKeyViewModel(dependencyProvider: self.dependencyProvider)) + navigationController.pushViewController(UIHostingController(rootView: view), animated: true) + } + func identitiesSelected() { showIdentities() } diff --git a/ConcordiumWallet/Views/MoreSection/MoreMenuPresenter.swift b/ConcordiumWallet/Views/MoreSection/MoreMenuPresenter.swift index 68e2b78e..3e2cb052 100644 --- a/ConcordiumWallet/Views/MoreSection/MoreMenuPresenter.swift +++ b/ConcordiumWallet/Views/MoreSection/MoreMenuPresenter.swift @@ -21,6 +21,7 @@ protocol MoreMenuPresenterDelegate: AnyObject { func updateSelected() func recoverySelected() async throws func aboutSelected() + func userShowPrivateKey() } // MARK: - @@ -33,6 +34,7 @@ protocol MoreMenuPresenterProtocol: AnyObject { func userSelectedUpdate() func userSelectedRecovery() async func userSelectedAbout() + func userShowPrivateKey() } class MoreMenuPresenter { @@ -71,4 +73,8 @@ extension MoreMenuPresenter: MoreMenuPresenterProtocol { func userSelectedAbout() { delegate?.aboutSelected() } + + func userShowPrivateKey() { + delegate?.userShowPrivateKey() + } } diff --git a/ConcordiumWallet/Views/MoreSection/MoreMenuViewController.swift b/ConcordiumWallet/Views/MoreSection/MoreMenuViewController.swift index de0c3dc7..43b41446 100644 --- a/ConcordiumWallet/Views/MoreSection/MoreMenuViewController.swift +++ b/ConcordiumWallet/Views/MoreSection/MoreMenuViewController.swift @@ -14,6 +14,7 @@ enum MenuCell: Hashable { case addressBook(title: String) case update(title: String) case recovery(title: String) + case privateKey(title: String) case about(title: String) } @@ -76,6 +77,8 @@ extension MoreMenuViewController: UITableViewDelegate { presenter.userSelectedUpdate() case .recovery: Task { await presenter.userSelectedRecovery() } + case .privateKey: + presenter.userShowPrivateKey() case .about: presenter.userSelectedAbout() } @@ -90,6 +93,7 @@ extension MoreMenuViewController { snapshot.appendItems([.addressBook(title: "more.addressBook".localized)]) snapshot.appendItems([.update(title: "more.update".localized)]) snapshot.appendItems([.recovery(title: "more.recovery".localized)]) + snapshot.appendItems([.privateKey(title: "more.private.key".localized)]) snapshot.appendItems([.about(title: "more.about".localized)]) DispatchQueue.main.async { @@ -104,6 +108,7 @@ extension MoreMenuViewController { .addressBook(let title), .update(let title), .recovery(let title), + .privateKey(let title), .about(let title): // swiftlint:disable:next force_cast let cell = tableView.dequeueReusableCell(withIdentifier: "MenuItemCellView", for: indexPath) as! MenuItemCellView diff --git a/ConcordiumWallet/Views/RequestPasswordDelegate/SwiftUIRequestPasswordDelegate.swift b/ConcordiumWallet/Views/RequestPasswordDelegate/SwiftUIRequestPasswordDelegate.swift new file mode 100644 index 00000000..ea6d7c4c --- /dev/null +++ b/ConcordiumWallet/Views/RequestPasswordDelegate/SwiftUIRequestPasswordDelegate.swift @@ -0,0 +1,50 @@ +// +// SwiftUIRequestPasswordDelegate.swift +// ConcordiumWallet +// +// Created by Max on 11.09.2024. +// Copyright © 2024 concordium. All rights reserved. +// + +import UIKit +import Combine + +final class SwiftUIRequestPasswordDelegate: RequestPasswordDelegate { + func requestUserPassword(keychain: KeychainWrapperProtocol) -> AnyPublisher { + let requestPasswordPresenter = RequestPasswordPresenter(keychain: keychain) + var modalPasswordVCShown = false + let topController = UIApplication.shared.topMostViewController() + + requestPasswordPresenter.performBiometricLogin(fallback: { + self.show(requestPasswordPresenter) + modalPasswordVCShown = true + }) + + let cleanup: (Result) -> Future = { result in + let future = Future { promise in + if modalPasswordVCShown { + topController?.presentedViewController?.dismiss(animated: true, completion: { + promise(result) + }) + } else { + promise(result) + } + } + return future + } + + return requestPasswordPresenter.passwordPublisher + .flatMap { cleanup(.success($0)) } + .catch { cleanup(.failure($0)) } + .eraseToAnyPublisher() + } + + private func show(_ presenter: RequestPasswordPresenter) { + let vc = EnterPasswordFactory.create(with: presenter) + let nc = BaseNavigationController() + nc.modalPresentationStyle = .fullScreen + nc.viewControllers = [vc] + let topController = UIApplication.shared.topMostViewController() + topController?.present(nc, animated: true) + } +} diff --git a/ConcordiumWallet/Views/RevealPrivateKey/RevealPrivateKeyView.swift b/ConcordiumWallet/Views/RevealPrivateKey/RevealPrivateKeyView.swift new file mode 100644 index 00000000..fd198e4c --- /dev/null +++ b/ConcordiumWallet/Views/RevealPrivateKey/RevealPrivateKeyView.swift @@ -0,0 +1,140 @@ +// +// RevealPrivateKeyView.swift +// ConcordiumWallet +// +// Created by Max on 11.09.2024. +// Copyright © 2024 concordium. All rights reserved. +// + +import SwiftUI + +final class RevealPrivateKeyViewModel: ObservableObject { + typealias DependencyProvider = MoreFlowCoordinatorDependencyProvider & IdentitiesFlowCoordinatorDependencyProvider + + @Published var privateKey: String = "" + + private let dependencyProvider: DependencyProvider + private let passwordDelegate: RequestPasswordDelegate + + init(dependencyProvider: DependencyProvider, passwordDelegate: RequestPasswordDelegate = SwiftUIRequestPasswordDelegate()) { + self.dependencyProvider = dependencyProvider + self.passwordDelegate = passwordDelegate + } + + func getPrivateKey() async { + do { + let pwHash = try await passwordDelegate.requestUserPassword(keychain: dependencyProvider.keychainWrapper()) + let seedValue = try dependencyProvider.keychainWrapper().getValue(for: "RecoveryPhraseSeed", securedByPassword: pwHash).get() + await MainActor.run { + withAnimation { + self.privateKey = seedValue + } + } + } catch { + debugPrint(error) + } + } +} + +struct RevealPrivateKeyView: View { + @StateObject var viewModel: RevealPrivateKeyViewModel + + var body: some View { + NavigationView { + VStack(spacing: 8) { + Divider() + VStack(spacing: 16) { + Text("Your wallet private key is the access key to all the funds in your wallet. Copy it and keep it safe. To avoid mistakes, do not write it down manually.") + .font(.system(size: 14, weight: .regular)) + .foregroundColor(.black) + + + VStack { + HStack(alignment: .center, spacing: 8) { + Text(viewModel.privateKey) + .font(.system(size: 14, weight: .regular)) + .foregroundColor(.black) + .frame(maxWidth: .infinity, alignment: .topLeading) + .padding(12) + } + .frame(minHeight: 88) + .frame(maxWidth: .infinity) + .cornerRadius(8) + .overlay( + RoundedRectangle(cornerRadius: 8) + .inset(by: 0.5) + .stroke(Color(red: 0.78, green: 0.78, blue: 0.78), lineWidth: 1) + + ) + .padding(16) + } + .frame(minHeight: 120) + .frame(maxWidth: .infinity) + .cornerRadius(12) + .overlay( + RoundedRectangle(cornerRadius: 12) + .inset(by: 0.5) + .stroke(viewModel.privateKey.isEmpty + ? .black.opacity(0.05) + : Color(red: 0.27, green: 0.52, blue: 0.67), + lineWidth: 1 + ) + ) + .overlay { + if !viewModel.privateKey.isEmpty { + EmptyView() + } else { + ZStack { + Image("icon_lock_pk") + } + .frame(maxWidth: .infinity) + .frame(minHeight: 120) + .background(.ultraThickMaterial, in: RoundedRectangle(cornerRadius: 12)) + .overlay( + RoundedRectangle(cornerRadius: 12) + .inset(by: 0.5) + .stroke(.black.opacity(0.05), lineWidth: 1) + ) + } + } + .animation(.bouncy, value: viewModel.privateKey) + .onTapGesture { + handleTap() + } + + Button(action: { + handleTap() + }, label: { + Label( + viewModel.privateKey.isEmpty + ? "Show the wallet private key" + : "Copy to clipboard", + image: viewModel.privateKey.isEmpty ? "ico_eye" : "ico_copy" + ) + .font(.system(size: 14, weight: .regular)) + .foregroundColor(.black) + .transition(AnyTransition.opacity.animation(.bouncy)) + }) + .tint(.black) + + Spacer() + } + .padding(18) + } + .navigationTitle("Wallet private key") + .navigationBarTitleDisplayMode(.inline) + } + } + + private func handleTap() { + HapticFeedbackHelper.generate(feedback: .light) + + if viewModel.privateKey.isEmpty { + Task { + await viewModel.getPrivateKey() + } + } else { + UIPasteboard.general.string = viewModel.privateKey + } + } +} diff --git a/ioscommon/Base/BaseNavigationController.swift b/ioscommon/Base/BaseNavigationController.swift index fc93c862..5ee52c0e 100644 --- a/ioscommon/Base/BaseNavigationController.swift +++ b/ioscommon/Base/BaseNavigationController.swift @@ -10,7 +10,7 @@ import UIKit class BaseNavigationController: UINavigationController { - var statusBarStyle = UIStatusBarStyle.darkContent + var statusBarStyle = UIStatusBarStyle.lightContent override func viewDidLoad() { super.viewDidLoad()