From 1af3d22f956876850b6e2c9dff62fb2bc9901a60 Mon Sep 17 00:00:00 2001 From: Max Rachytskyy Date: Wed, 11 Sep 2024 21:53:22 +0300 Subject: [PATCH] Add ability sho export RecoveryPhraseSeed --- ConcordiumWallet.xcodeproj/project.pbxproj | 66 +++++--- .../xcshareddata/swiftpm/Package.resolved | 150 ++++++++++++++++++ .../Extensions/UIApplication+Helper.swift | 7 + .../Extensions/UIViewController+Helper.swift | 18 +++ .../icons/ico_copy.imageset/Contents.json | 23 +++ .../icons/ico_copy.imageset/ic 24.png | Bin 0 -> 251 bytes .../icons/ico_copy.imageset/ic 24@2x.png | Bin 0 -> 326 bytes .../icons/ico_copy.imageset/ic 24@3x.png | Bin 0 -> 477 bytes .../icons/ico_eye.imageset/Contents.json | 23 +++ .../icons/ico_eye.imageset/Eye.png | Bin 0 -> 314 bytes .../icons/ico_eye.imageset/Eye@2x.png | Bin 0 -> 498 bytes .../icons/ico_eye.imageset/Eye@3x.png | Bin 0 -> 744 bytes .../icons/icon_lock_pk.imageset/Contents.json | 23 +++ .../icons/icon_lock_pk.imageset/Lock.png | Bin 0 -> 626 bytes .../icons/icon_lock_pk.imageset/Lock@2x.png | Bin 0 -> 1042 bytes .../icons/icon_lock_pk.imageset/Lock@3x.png | Bin 0 -> 1509 bytes .../Base.lproj/Localizable.strings | 1 + .../Views/MoreSection/MoreCoordinator.swift | 6 + .../Views/MoreSection/MoreMenuPresenter.swift | 6 + .../MoreSection/MoreMenuViewController.swift | 5 + .../SwiftUIRequestPasswordDelegate.swift | 50 ++++++ .../RevealPrivateKeyView.swift | 140 ++++++++++++++++ ioscommon/Base/BaseNavigationController.swift | 2 +- 23 files changed, 501 insertions(+), 19 deletions(-) create mode 100644 ConcordiumWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/Contents.json create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24.png create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24@2x.png create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/ico_copy.imageset/ic 24@3x.png create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Contents.json create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye.png create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye@2x.png create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/ico_eye.imageset/Eye@3x.png create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Contents.json create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock.png create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock@2x.png create mode 100644 ConcordiumWallet/Resources/Assets.xcassets/icons/icon_lock_pk.imageset/Lock@3x.png create mode 100644 ConcordiumWallet/Views/RequestPasswordDelegate/SwiftUIRequestPasswordDelegate.swift create mode 100644 ConcordiumWallet/Views/RevealPrivateKey/RevealPrivateKeyView.swift 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 0000000000000000000000000000000000000000..a17dc94310f2a3c2f9f609013ef772da663e7ee3 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRt!3HF+tk*dLq&N#aB8wRqxP?KOkzv*x37{Zj zage(c!@6@aFM%AEbVpxD28NCO+GnryU+0u>%-KEPnI~_UaZhlrK<6Z}$zT3Qr{wGxHRR_o%nj98 Sd|V0WO$JX_KbLh*2~7aLcX>wu literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..4f4f5d9124b2fd52dce232b27ed8e1ca3bec7502 GIT binary patch literal 477 zcmeAS@N?(olHy`uVBq!ia0vp^20(1c!3HGf#Azu3Db50q$YKTtMGFvSbe(3H02E{_ z4sv&5Sa(k5C6L3C?&#~tz_78O`%fY(P_D?+#WAFU@$Jm_zK0D2j?Qo3|FBj%!R!Uc zy@tL6YzJ64CvTBv5H|5~FwZd4kiM{4W~E=~_J7jqSN|?qzU$P<=hH3HkFrU$C9Z2_ z&2<0Oe?dRfQ%K{0`XjdbHK$Zx>R$TjFlkBk634Rr_A>;8s-$N6CpB_zI&|=Wm~cv4 zo#TXU2c&x@+h5xLu|AJ`PqRH!Ropp&b8TNr6_=Ubx)x){#!}Kd&BNLISHryb2X{yb zEHS;LXTbEU&BjTZ^Uzg?)_)JATdt>@%FgTk_iEjGwwVGiu0It&ve;+F*SbojWoGNH zZ|jR$HDTw36{j{h*{nLXC%UNOVbXy$4AM&$Z+!A0Y0c{fx{sQpXb_@>1@&9IZtINZO6 zEB=kU9C>fTw;w02h%pB$pMSv0=Hl@F%+Yyn>lWspNYFPr9HU*`!?v)*PI$TzFg6%G MUHx3vIVCg!05{acbpQYW literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..dff74c5fde2e4a9ab48fac86a48e7798a9f29046 GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co&H|6fVg?3oVGw3ym^DWND9BhG zd9yMgp)C>+vW9gsJ zH;q?9F^$=bLwdZQ?;N5nhSzX^mRO^~b@ZFXpbIMjF3B8`w#<|yvt@@YO)6ZXeLmIqp zS_*H?DqEJjp7~v1LqBtm@$o(D-&)SxcKgH!bH}NHD}1%4)J}RhKkL?Bu9` zwRz6;9V-rBELoF!d*dbFU9}w58z<$xX=Ju|)v`b5&6zKZ8;guJrZk`03-lU;r>mdK II;Vst0E+K=TL1t6 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..d10ada72089211ec82739855118147dda088e241 GIT binary patch literal 498 zcmVd+Af;xn-)3iC|kO8g{#5Z{S!=Ksy0H&n!x_*Fq=0{s_smd8N&Ogxyt zy1-W&+c{Ws419|rh>IgMRSF5>?5tlu*HsUX6!#u*h(A2$cS`KAX7r)g6)E5HxP`# zfHY)o6Zpry)3F(hNW-3c4qbuY0b9a&Oo(vE`CP#x>7z@--Cp}jN~B?RQuj)Lsrs1_ zm{5K($ApHxS1MumL=ID*i2wiq07*qoM6N<$g23I)`2YX_ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..721767b9403c63f63c8c14f95136ccbfcd2db9ed GIT binary patch literal 744 zcmVP)QE8=CfBAGW3LHu>{gRV zL$G>cfg)Cq3Mtz8w?m#W7vy0_S0w1~Ft(3eN_JYDkcM6G3-Yk%gp`13I*bP!d}a#L zx_?F*b{gD~$K6v-h#%Iy&_CRXpVs{omNUeqpBjMHx<9%U2eC{HjqMfHHqf>+N zs3DMsWc9=#B#ut+M&-^E3iIZPL#BRGi}NK!Y{qsuEwms6ojGkMw7+tW{@U4R=^1e8zcfKM&hv~oPe-H3KA?41S#AgHy}44 z3szuv(QT&_glr<)od^kkQcL|R_pg3bcNzHP5DZW`YC9I=uK<3ivIX=2aeq@^yh27Y z2~@&}>6Dqv(I2Ni3tsE&R=Y?^YJtBGFII@T^`>edQ(t~@01jrdq#KxM^{)Q^3@Jz@ z@Xyg@*%RKwNSMIMci(Pax$^_vr?TI!fv6$nmBNAe=k4}F4+*i50*}2@otFd8$t85( zic@rUs!f8J(`7k}$4Eh9fok^T5;~zcYJD^-!?wMkAZ;9FJ8gl!cyUIBqBxn<-?qHg zxVvzWki-HRRMz?1&B=S}dTY5qwiRV0B-I|ACAq+?#QH&XOGy9bL|FXNrx^N#PNp%m z?MmDG_l*{bUfi`vG2$9hoQqjP{zj+1)O=qZy~KiQm^EBzL{-}{z4bl1*V(SRm?D*f zwu^8Jl%m@6Q=FAtU{=1Cz<=&#NhKJ>m_QW*JQcl1l`4nl#{8%;figa+jq~<83}J4G z38N=J%exhZuwe+ByfvQ-!7P4zF1j#;F@eLEv++AT_k&r<1!m>b3;g&L%lKpXpqw6I zj1!9;W7G`-qcAvfFiltw$&t=Ia*37GMeq}HM#u>%SpGb6a&nUM3j127OuIWP1^@s6 M07*qoM6N<$f)1e)5C8xG literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..c8e64582155f3dce436216762008964e9772f6e0 GIT binary patch literal 1042 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r51|<6gKdl8)oCO|{#S9E$svykh8Km+7D9BhG z0%oB2yX!t+#?yG}xzc^Iv z99|1^Y@8wItt922JKw?f+A>XF=UEl6g+=_2U1I6$O*$~!y@qjfEi>OSm&E7gX|ttH zGu?g5zghUl{uYzJ(^IGS-<)}~K25A4ag$3!a!#0(_WpN&PijxFbcpC|VygOeHTK`z z^4U{^_+<`pHoDz9|GPOnD#EVH*I|BvID@~<&MP}_=(0{QoXPb^-LLa{)G4o7wX7Ws zs@I}+KXpDa;S5WjjCqk_TdvC)Mn>gJlj9UuUz*W*An9ukuj97M({^!wVM%!S`QB%} zh-14Bw0zpdv1s+u7`OkN8@a+&OLGs|&Ggu!_2Js-u!9c|e9xY1IQ{XlkL@uMzeGhg zm}XUrP2U{ac=XjzO{P5OH!21f>b*R@{Z)i)|2lWb9I;<>xhh((L3IshjQzUjrJUK$ zZ&(Z}F2q+&*;b#f!Z+o9L*VqSO-|YS?=W(EY+yZfu;9dr&nXc*yr2I_`kwmWw4-Oe zS53Tr-I~Zm*99woA1j%_-^;N>IW0b9gYfMI{Zq}4Z)p&1WR}U{JMQ!Ha%miIN6pRp zYbIas72J_8JQJDlQb?@7U0LG@rw@0_`i~ON4lZut<0s({olaj}}&;#73701wk;=bMCpW zOF?Rzo04+7G=ILi`28}|$J$%JKZh`F-NQULd-VYu<%N^dmgsMEu${JX?Qu=NL_v>< z6MSRXU%fdgro*KvwCSYu#OO4hGoluSU*5CX31qyTI(K$-vG}#sr7~Qqc``etol$K> zvK+!(&MJ0)?pjyLf_BB!rKhs@`Hi#IuFI7hoN&1l)A zO&|YPbkEdCNlI(8w`eP7au)SF#g^ZkY@sf2^hai9#R`HmN)W@nC_$*=YIM*>_VKe_69j{k#rvM91}xaDxpbxRBSo>t9(o2W z&o>?1d}vLC*ROj=m=@oe6UET^%X(SlyQhv^bz5G~ZTCMlU7=+qcd>!}4ELV8%b&_h l99J?PHsArHp38q&k7(LWTs7h5LtqwW@O1TaS?83{1OT-*z$yR$ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..61921e91f7bc42cd6613cf168030056a554f63a1 GIT binary patch literal 1509 zcmbVMdpHvc6rY+fl*vUbk38aX)0ml8nyhVR3+shwW$0n%{eEN-l6M~0hAu9BK31mI zWg)AZykD*I7RL1$kwzhR?tk6yyZ_wtedqkn`JMB9=lh*MPKqM|Eelcs0RRA5EXK}R zgyFj`xla_$$?$#=Ncm%2f&c(b#IB2>@}MLUDHi06wgoV|A#J>8&f` z0DyQT)(&|#Tue}OhM&L+K1UE#~7UtmaFjbI$}Yx*b%gLEw=?dS7LM(3~Vfyh8nId<{*YRepH#Z z_&gUW>6hgq)qfpvc5PawUv~{3NBLBqLX`)PSdaJ;#n)a_GaGYrI({>kIMGglc(+DP zLp{)s=L+3Uk5N2S34H9j|ILgWFMdG9U|ROyRKN}KduA1@ne{$3F}8A(3xla|SLO5?9Ngl!Jz9{z<5SnJ+RsHu zSz9lu`MNubpY2Btcix6cT4XMywLFP5i59-44I zZOl9%l+HSWN7YL@d`5J6vW^h;qtJ<8t605P#@n%G7ENOZpI z+G5M6s&s4bWQu0IvpfdbPI8xbb9N$3n|~A~@Z~?buDDSEuR4?C%V$}&vDKW5atESM zZo95owyC~~ro=ANe{V+$W9&OdOW@D2=0UZJ6m7Tq_pqdi8`=NsEZ>A=sCDFpRDc4M z$-5|>PK!W5qo@ql;1NfMrV&l^iFc^FPE_8O!s!=I5JEE#9<^ zuXZJ6BiBg_qDiaNbXvGphaw>ND*q0W<&ch$W~aDm9_`4ybhyGz;8uT5`_FT(lhz!{ yp3h+}DPe(nD 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()