diff --git a/Example/myWeb3Wallet/Podfile b/Example/myWeb3Wallet/Podfile deleted file mode 100644 index 9dea1b01f..000000000 --- a/Example/myWeb3Wallet/Podfile +++ /dev/null @@ -1,30 +0,0 @@ -# Uncomment the next line to define a global platform for your project -platform :ios, '15.0' - -target 'myWeb3Wallet' do - # Comment the next line if you don't want to use dynamic frameworks - use_frameworks! - - # Pods for myWeb3Wallet -pod 'web3swift', :git => 'https://github.com/veerChauhan/web3swift.git', :branch => 'develop' - - - target 'myWeb3WalletTests' do - inherit! :search_paths - # Pods for testing - end - - target 'myWeb3WalletUITests' do - # Pods for testing - end - -end - -# set iOS deployment target for every pod to avoid warnings -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0' - end - end -end diff --git a/Example/myWeb3Wallet/Podfile.lock b/Example/myWeb3Wallet/Podfile.lock deleted file mode 100644 index 5fd352276..000000000 --- a/Example/myWeb3Wallet/Podfile.lock +++ /dev/null @@ -1,53 +0,0 @@ -PODS: - - BigInt (5.2.0) - - CryptoSwift (1.4.2) - - PromiseKit (6.15.3): - - PromiseKit/CorePromise (= 6.15.3) - - PromiseKit/Foundation (= 6.15.3) - - PromiseKit/UIKit (= 6.15.3) - - PromiseKit/CorePromise (6.15.3) - - PromiseKit/Foundation (6.15.3): - - PromiseKit/CorePromise - - PromiseKit/UIKit (6.15.3): - - PromiseKit/CorePromise - - secp256k1.c (0.1.2) - - Starscream (4.0.4) - - web3swift (2.3.0): - - BigInt (~> 5.2) - - CryptoSwift (~> 1.4.0) - - PromiseKit (~> 6.15.3) - - secp256k1.c (~> 0.1) - - Starscream (~> 4.0.4) - -DEPENDENCIES: - - web3swift (from `https://github.com/veerChauhan/web3swift.git`, branch `develop`) - -SPEC REPOS: - trunk: - - BigInt - - CryptoSwift - - PromiseKit - - secp256k1.c - - Starscream - -EXTERNAL SOURCES: - web3swift: - :branch: develop - :git: https://github.com/veerChauhan/web3swift.git - -CHECKOUT OPTIONS: - web3swift: - :commit: d05a569a1dbb43b3770832cfa2be703ec26ca894 - :git: https://github.com/veerChauhan/web3swift.git - -SPEC CHECKSUMS: - BigInt: f668a80089607f521586bbe29513d708491ef2f7 - CryptoSwift: a532e74ed010f8c95f611d00b8bbae42e9fe7c17 - PromiseKit: 3b2b6995e51a954c46dbc550ce3da44fbfb563c5 - secp256k1.c: db47b726585d80f027423682eb369729e61b3b20 - Starscream: 5178aed56b316f13fa3bc55694e583d35dd414d9 - web3swift: dcc8da6f0944a062faa381869ce64114ddb5f8d3 - -PODFILE CHECKSUM: 53e3e6ef11ba247d3bee3e2fa1580cb90296aef2 - -COCOAPODS: 1.11.2 diff --git a/Example/myWeb3Wallet/myWeb3Wallet.xcodeproj/project.pbxproj b/Example/myWeb3Wallet/myWeb3Wallet.xcodeproj/project.pbxproj index 2c39452c9..224ad4a5b 100644 --- a/Example/myWeb3Wallet/myWeb3Wallet.xcodeproj/project.pbxproj +++ b/Example/myWeb3Wallet/myWeb3Wallet.xcodeproj/project.pbxproj @@ -7,9 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 08D762AA7F8C96F1FEC2BDDA /* Pods_myWeb3Wallet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6EB035B54D0DDFE25556549 /* Pods_myWeb3Wallet.framework */; }; - 1A3D2B3177B96101E5BA3A86 /* Pods_myWeb3WalletTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4590F35DEE4A4CA41141602 /* Pods_myWeb3WalletTests.framework */; }; - ADDA7950DDF6B6F2FFB1F198 /* Pods_myWeb3Wallet_myWeb3WalletUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DEF494BADF9FD39D553B87D /* Pods_myWeb3Wallet_myWeb3WalletUITests.framework */; }; + D6DD90D22991966100EE140E /* web3swift in Frameworks */ = {isa = PBXBuildFile; productRef = D6DD90D12991966100EE140E /* web3swift */; }; FA5308212721D59B002C1F06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5308202721D59B002C1F06 /* AppDelegate.swift */; }; FA5308232721D59B002C1F06 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5308222721D59B002C1F06 /* SceneDelegate.swift */; }; FA5308252721D59B002C1F06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5308242721D59B002C1F06 /* ViewController.swift */; }; @@ -47,14 +45,8 @@ /* Begin PBXFileReference section */ 2DEF494BADF9FD39D553B87D /* Pods_myWeb3Wallet_myWeb3WalletUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_myWeb3Wallet_myWeb3WalletUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5B0E97C0C8FE51D0241E7D19 /* Pods-myWeb3Wallet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-myWeb3Wallet.release.xcconfig"; path = "Target Support Files/Pods-myWeb3Wallet/Pods-myWeb3Wallet.release.xcconfig"; sourceTree = ""; }; - 600772647D45BC0D702D4137 /* Pods-myWeb3Wallet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-myWeb3Wallet.debug.xcconfig"; path = "Target Support Files/Pods-myWeb3Wallet/Pods-myWeb3Wallet.debug.xcconfig"; sourceTree = ""; }; - 7574A738941D92CC94F93A9E /* Pods-myWeb3Wallet-myWeb3WalletUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-myWeb3Wallet-myWeb3WalletUITests.release.xcconfig"; path = "Target Support Files/Pods-myWeb3Wallet-myWeb3WalletUITests/Pods-myWeb3Wallet-myWeb3WalletUITests.release.xcconfig"; sourceTree = ""; }; - A87A2F63C4B3084139E790F5 /* Pods-myWeb3WalletTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-myWeb3WalletTests.debug.xcconfig"; path = "Target Support Files/Pods-myWeb3WalletTests/Pods-myWeb3WalletTests.debug.xcconfig"; sourceTree = ""; }; D4590F35DEE4A4CA41141602 /* Pods_myWeb3WalletTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_myWeb3WalletTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D6018FABA256C0117F85A829 /* Pods-myWeb3Wallet-myWeb3WalletUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-myWeb3Wallet-myWeb3WalletUITests.debug.xcconfig"; path = "Target Support Files/Pods-myWeb3Wallet-myWeb3WalletUITests/Pods-myWeb3Wallet-myWeb3WalletUITests.debug.xcconfig"; sourceTree = ""; }; D6EB035B54D0DDFE25556549 /* Pods_myWeb3Wallet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_myWeb3Wallet.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E41A5A8BF0A312348D3C52FD /* Pods-myWeb3WalletTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-myWeb3WalletTests.release.xcconfig"; path = "Target Support Files/Pods-myWeb3WalletTests/Pods-myWeb3WalletTests.release.xcconfig"; sourceTree = ""; }; FA53081D2721D59B002C1F06 /* myWeb3Wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = myWeb3Wallet.app; sourceTree = BUILT_PRODUCTS_DIR; }; FA5308202721D59B002C1F06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; FA5308222721D59B002C1F06 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -82,7 +74,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 08D762AA7F8C96F1FEC2BDDA /* Pods_myWeb3Wallet.framework in Frameworks */, + D6DD90D22991966100EE140E /* web3swift in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -90,7 +82,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1A3D2B3177B96101E5BA3A86 /* Pods_myWeb3WalletTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -98,26 +89,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - ADDA7950DDF6B6F2FFB1F198 /* Pods_myWeb3Wallet_myWeb3WalletUITests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 40AC3854191B335F2FCA6C71 /* Pods */ = { - isa = PBXGroup; - children = ( - 600772647D45BC0D702D4137 /* Pods-myWeb3Wallet.debug.xcconfig */, - 5B0E97C0C8FE51D0241E7D19 /* Pods-myWeb3Wallet.release.xcconfig */, - D6018FABA256C0117F85A829 /* Pods-myWeb3Wallet-myWeb3WalletUITests.debug.xcconfig */, - 7574A738941D92CC94F93A9E /* Pods-myWeb3Wallet-myWeb3WalletUITests.release.xcconfig */, - A87A2F63C4B3084139E790F5 /* Pods-myWeb3WalletTests.debug.xcconfig */, - E41A5A8BF0A312348D3C52FD /* Pods-myWeb3WalletTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; B67819FA7D92C1562AFD65A8 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -135,7 +112,6 @@ FA5308362721D59D002C1F06 /* myWeb3WalletTests */, FA5308402721D59D002C1F06 /* myWeb3WalletUITests */, FA53081E2721D59B002C1F06 /* Products */, - 40AC3854191B335F2FCA6C71 /* Pods */, B67819FA7D92C1562AFD65A8 /* Frameworks */, ); sourceTree = ""; @@ -227,17 +203,18 @@ isa = PBXNativeTarget; buildConfigurationList = FA5308472721D59D002C1F06 /* Build configuration list for PBXNativeTarget "myWeb3Wallet" */; buildPhases = ( - 2C189F9EA9914E3A42777867 /* [CP] Check Pods Manifest.lock */, FA5308192721D59B002C1F06 /* Sources */, FA53081A2721D59B002C1F06 /* Frameworks */, FA53081B2721D59B002C1F06 /* Resources */, - 5E0CBD27780EAD115251C9AC /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( ); name = myWeb3Wallet; + packageProductDependencies = ( + D6DD90D12991966100EE140E /* web3swift */, + ); productName = myWeb3Wallet; productReference = FA53081D2721D59B002C1F06 /* myWeb3Wallet.app */; productType = "com.apple.product-type.application"; @@ -246,7 +223,6 @@ isa = PBXNativeTarget; buildConfigurationList = FA53084A2721D59D002C1F06 /* Build configuration list for PBXNativeTarget "myWeb3WalletTests" */; buildPhases = ( - 342829194E3F4C74B29C947B /* [CP] Check Pods Manifest.lock */, FA53082F2721D59D002C1F06 /* Sources */, FA5308302721D59D002C1F06 /* Frameworks */, FA5308312721D59D002C1F06 /* Resources */, @@ -265,11 +241,9 @@ isa = PBXNativeTarget; buildConfigurationList = FA53084D2721D59D002C1F06 /* Build configuration list for PBXNativeTarget "myWeb3WalletUITests" */; buildPhases = ( - 5F33F7D7F77389C37C4F1656 /* [CP] Check Pods Manifest.lock */, FA5308392721D59D002C1F06 /* Sources */, FA53083A2721D59D002C1F06 /* Frameworks */, FA53083B2721D59D002C1F06 /* Resources */, - AAF75ECFD98859A6D0818BB6 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -313,6 +287,9 @@ Base, ); mainGroup = FA5308142721D59B002C1F06; + packageReferences = ( + D6DD90D02991966100EE140E /* XCRemoteSwiftPackageReference "web3swift" */, + ); productRefGroup = FA53081E2721D59B002C1F06 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -355,109 +332,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 2C189F9EA9914E3A42777867 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-myWeb3Wallet-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 342829194E3F4C74B29C947B /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-myWeb3WalletTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 5E0CBD27780EAD115251C9AC /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-myWeb3Wallet/Pods-myWeb3Wallet-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-myWeb3Wallet/Pods-myWeb3Wallet-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-myWeb3Wallet/Pods-myWeb3Wallet-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 5F33F7D7F77389C37C4F1656 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-myWeb3Wallet-myWeb3WalletUITests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - AAF75ECFD98859A6D0818BB6 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-myWeb3Wallet-myWeb3WalletUITests/Pods-myWeb3Wallet-myWeb3WalletUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-myWeb3Wallet-myWeb3WalletUITests/Pods-myWeb3Wallet-myWeb3WalletUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-myWeb3Wallet-myWeb3WalletUITests/Pods-myWeb3Wallet-myWeb3WalletUITests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ FA5308192721D59B002C1F06 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -642,7 +516,6 @@ }; FA5308482721D59D002C1F06 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 600772647D45BC0D702D4137 /* Pods-myWeb3Wallet.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -671,7 +544,6 @@ }; FA5308492721D59D002C1F06 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5B0E97C0C8FE51D0241E7D19 /* Pods-myWeb3Wallet.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -700,7 +572,6 @@ }; FA53084B2721D59D002C1F06 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A87A2F63C4B3084139E790F5 /* Pods-myWeb3WalletTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -726,7 +597,6 @@ }; FA53084C2721D59D002C1F06 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E41A5A8BF0A312348D3C52FD /* Pods-myWeb3WalletTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -752,7 +622,6 @@ }; FA53084E2721D59D002C1F06 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D6018FABA256C0117F85A829 /* Pods-myWeb3Wallet-myWeb3WalletUITests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; CODE_SIGN_STYLE = Automatic; @@ -776,7 +645,6 @@ }; FA53084F2721D59D002C1F06 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7574A738941D92CC94F93A9E /* Pods-myWeb3Wallet-myWeb3WalletUITests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; CODE_SIGN_STYLE = Automatic; @@ -838,6 +706,25 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + D6DD90D02991966100EE140E /* XCRemoteSwiftPackageReference "web3swift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/web3swift-team/web3swift"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 3.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + D6DD90D12991966100EE140E /* web3swift */ = { + isa = XCSwiftPackageProductDependency; + package = D6DD90D02991966100EE140E /* XCRemoteSwiftPackageReference "web3swift" */; + productName = web3swift; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = FA5308152721D59B002C1F06 /* Project object */; } diff --git a/Example/myWeb3Wallet/myWeb3Wallet/ViewControllers/WalletController/WalletViewController.swift b/Example/myWeb3Wallet/myWeb3Wallet/ViewControllers/WalletController/WalletViewController.swift index 640ce697b..922cd5757 100644 --- a/Example/myWeb3Wallet/myWeb3Wallet/ViewControllers/WalletController/WalletViewController.swift +++ b/Example/myWeb3Wallet/myWeb3Wallet/ViewControllers/WalletController/WalletViewController.swift @@ -7,6 +7,8 @@ import UIKit import web3swift +import Web3Core + class WalletViewController: UIViewController { @IBOutlet weak var continueButton: UIButton! @@ -46,9 +48,9 @@ class WalletViewController: UIViewController { @IBAction func onClickContinueButton(_ sender: UIButton) { print("Clicked on COntinue button") guard let dashboardScreen = self.storyboard?.instantiateViewController(withIdentifier: "DashboardViewController") as? DashboardViewController else { - #if DEBUG +#if DEBUG printContent("Unable to get Wallet controller") - #endif +#endif return } self.navigationController?.pushViewController(dashboardScreen, animated: true) @@ -83,7 +85,7 @@ class WalletViewController: UIViewController { return } do { - let keystore = try EthereumKeystoreV3(privateKey: dataKey) + let keystore = try EthereumKeystoreV3(privateKey: dataKey, password: "") if let myWeb3KeyStore = keystore { let manager = KeystoreManager([myWeb3KeyStore]) let address = keystore?.addresses?.first @@ -110,14 +112,13 @@ class WalletViewController: UIViewController { } } + func importWalletWith(mnemonics: String) { - let walletAddress = try? BIP32Keystore(mnemonics: mnemonics, prefixPath: "m/44'/77777'/0'/0") - print(walletAddress?.addresses) + let walletAddress = try? BIP32Keystore(mnemonics: mnemonics, password: "", prefixPath: "m/44'/77777'/0'/0") self.walletAddressLabel.text = "\(walletAddress?.addresses?.first?.address ?? "0x")" - } - } + extension WalletViewController { fileprivate func createMnemonics() { @@ -132,10 +133,10 @@ extension WalletViewController { } self._mnemonics = tMnemonics print(_mnemonics) - let tempWalletAddress = try? BIP32Keystore(mnemonics: self._mnemonics, prefixPath: "m/44'/77777'/0'/0") - print(tempWalletAddress?.addresses?.first?.address) + + let tempWalletAddress = try? BIP32Keystore(mnemonics: self._mnemonics, password: "", prefixPath: "m/44'/77777'/0'/0") guard let walletAddress = tempWalletAddress?.addresses?.first else { - self.showAlertMessage(title: "", message: "We are unable to create wallet", actionName: "Ok") + self.showAlertMessage(title: "", message: "Unable to create wallet", actionName: "Ok") return } self._walletAddress = walletAddress.address @@ -144,7 +145,7 @@ extension WalletViewController { print(privateKey, "Is the private key") #endif let keyData = try? JSONEncoder().encode(tempWalletAddress?.keystoreParams) - FileManager.default.createFile(atPath: userDir + "/keystore"+"/key.json", contents: keyData, attributes: nil) + FileManager.default.createFile(atPath: userDir + "/keystore" + "/key.json", contents: keyData, attributes: nil) } } catch {