From a8bb8413e59e090333a69ea4739054378fbe1031 Mon Sep 17 00:00:00 2001 From: Ivan Grachyov Date: Mon, 21 Jun 2021 23:56:35 +0300 Subject: [PATCH] Add Secrets --- Encrypted Ink.xcodeproj/project.pbxproj | 4 ++++ Encrypted Ink/Ethereum/Ethereum.swift | 2 +- Encrypted Ink/Secrets.swift | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Encrypted Ink/Secrets.swift diff --git a/Encrypted Ink.xcodeproj/project.pbxproj b/Encrypted Ink.xcodeproj/project.pbxproj index 48b90873..68641e2f 100644 --- a/Encrypted Ink.xcodeproj/project.pbxproj +++ b/Encrypted Ink.xcodeproj/project.pbxproj @@ -26,6 +26,7 @@ 2C1995442674C4BA00A8E370 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C1995432674C4BA00A8E370 /* Assets.xcassets */; }; 2C1995472674C4BA00A8E370 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C1995452674C4BA00A8E370 /* Main.storyboard */; }; 2C1995562674D0F300A8E370 /* Ethereum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C1995552674D0F300A8E370 /* Ethereum.swift */; }; + 2C208A9F26813408005BA500 /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C208A9E26813408005BA500 /* Secrets.swift */; }; 2C528A16267FA8EB00CA3ADD /* Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C528A15267FA8EB00CA3ADD /* Defaults.swift */; }; 2C6706A5267A6BFE006AAEF2 /* Bundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6706A4267A6BFE006AAEF2 /* Bundle.swift */; }; 2C797E7E267BB88800F2CE2D /* WelcomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C797E7D267BB88800F2CE2D /* WelcomeViewController.swift */; }; @@ -70,6 +71,7 @@ 2C1995482674C4BA00A8E370 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 2C1995492674C4BA00A8E370 /* Encrypted_Ink.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Encrypted_Ink.entitlements; sourceTree = ""; }; 2C1995552674D0F300A8E370 /* Ethereum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Ethereum.swift; sourceTree = ""; }; + 2C208A9E26813408005BA500 /* Secrets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Secrets.swift; sourceTree = ""; }; 2C528A15267FA8EB00CA3ADD /* Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Defaults.swift; sourceTree = ""; }; 2C6706A4267A6BFE006AAEF2 /* Bundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bundle.swift; sourceTree = ""; }; 2C797E7D267BB88800F2CE2D /* WelcomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeViewController.swift; sourceTree = ""; }; @@ -172,6 +174,7 @@ 2C1995432674C4BA00A8E370 /* Assets.xcassets */, 2C1995482674C4BA00A8E370 /* Info.plist */, 2C1995492674C4BA00A8E370 /* Encrypted_Ink.entitlements */, + 2C208A9E26813408005BA500 /* Secrets.swift */, ); path = "Encrypted Ink"; sourceTree = ""; @@ -376,6 +379,7 @@ 2C8A09C6267513FC00993638 /* Agent.swift in Sources */, 2C8A09D42675184700993638 /* Window.swift in Sources */, 0DB7291A2674E2DB0011F7A1 /* EIP712Type.swift in Sources */, + 2C208A9F26813408005BA500 /* Secrets.swift in Sources */, 0DB7291D2674E2DB0011F7A1 /* EIP712Hashable.swift in Sources */, 0DB729162674E2DB0011F7A1 /* EIP712SimpleValue.swift in Sources */, 0DB729122674E2DB0011F7A1 /* EIP712ParameterEncoder.swift in Sources */, diff --git a/Encrypted Ink/Ethereum/Ethereum.swift b/Encrypted Ink/Ethereum/Ethereum.swift index a826fba4..9ed1bf54 100644 --- a/Encrypted Ink/Ethereum/Ethereum.swift +++ b/Encrypted Ink/Ethereum/Ethereum.swift @@ -13,7 +13,7 @@ struct Ethereum { private static let network: Network = AlchemyNetwork( chain: "mainnet", - apiKey: "xxx" + apiKey: Secrets.alchemy ) static func sign(message: String, account: Account) throws -> String { diff --git a/Encrypted Ink/Secrets.swift b/Encrypted Ink/Secrets.swift new file mode 100644 index 00000000..d1ae00da --- /dev/null +++ b/Encrypted Ink/Secrets.swift @@ -0,0 +1,9 @@ +// Copyright © 2021 Encrypted Ink. All rights reserved. + +import Foundation + +struct Secrets { + + static let alchemy = "xxx" + +}