Skip to content

Commit cabc1d8

Browse files
Merge pull request #73 from Adamant-im/dev/migrate-to-spm
Migrate to spm
2 parents 9e62dae + ea3d7aa commit cabc1d8

File tree

438 files changed

+85253
-612
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

438 files changed

+85253
-612
lines changed

Adamant.xcodeproj/project.pbxproj

Lines changed: 528 additions & 232 deletions
Large diffs are not rendered by default.

Adamant.xcodeproj/xcshareddata/xcschemes/Adamant.Release.xcscheme

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
33
LastUpgradeVersion = "1010"
4-
version = "1.3">
4+
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "E913C8ED1FFFA51D001A83F7"
34+
BuildableName = "Adamant.app"
35+
BlueprintName = "Adamant"
36+
ReferencedContainer = "container:Adamant.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -39,17 +48,6 @@
3948
</BuildableReference>
4049
</TestableReference>
4150
</Testables>
42-
<MacroExpansion>
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "E913C8ED1FFFA51D001A83F7"
46-
BuildableName = "Adamant.app"
47-
BlueprintName = "Adamant"
48-
ReferencedContainer = "container:Adamant.xcodeproj">
49-
</BuildableReference>
50-
</MacroExpansion>
51-
<AdditionalOptions>
52-
</AdditionalOptions>
5351
</TestAction>
5452
<LaunchAction
5553
buildConfiguration = "Release"
@@ -71,8 +69,6 @@
7169
ReferencedContainer = "container:Adamant.xcodeproj">
7270
</BuildableReference>
7371
</BuildableProductRunnable>
74-
<AdditionalOptions>
75-
</AdditionalOptions>
7672
</LaunchAction>
7773
<ProfileAction
7874
buildConfiguration = "Release"
@@ -97,5 +93,23 @@
9793
<ArchiveAction
9894
buildConfiguration = "Release"
9995
revealArchiveInOrganizer = "YES">
96+
<PostActions>
97+
<ExecutionAction
98+
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
99+
<ActionContent
100+
title = "Run Script"
101+
scriptText = "# Type a script or drag a script file from your workspace to insert its path.&#10;APPLICATIONS_PATH=&quot;$ARCHIVE_PRODUCTS_PATH/Applications&quot;&#10;rm &quot;$APPLICATIONS_PATH/$FRAMEWORKS_FOLDER_PATH/libsodium.a&quot;&#10;rm &quot;$APPLICATIONS_PATH/$PRODUCT_NAME.app/PlugIns/libsodium.a&quot;&#10;rm -r &quot;$APPLICATIONS_PATH/$PRODUCT_NAME.app/PlugIns/OpenSSL.framework&quot;&#10;&#10;find &quot;$APPLICATIONS_PATH/$PRODUCT_NAME.app/PlugIns&quot; -name &apos;*.appex&apos; -type d | while read -r EXTENSION&#10;do&#10;rm -r &quot;$EXTENSION/Frameworks&quot;&#10;done&#10;">
102+
<EnvironmentBuildable>
103+
<BuildableReference
104+
BuildableIdentifier = "primary"
105+
BlueprintIdentifier = "E913C8ED1FFFA51D001A83F7"
106+
BuildableName = "Adamant.app"
107+
BlueprintName = "Adamant"
108+
ReferencedContainer = "container:Adamant.xcodeproj">
109+
</BuildableReference>
110+
</EnvironmentBuildable>
111+
</ActionContent>
112+
</ExecutionAction>
113+
</PostActions>
100114
</ArchiveAction>
101115
</Scheme>

Adamant.xcworkspace/contents.xcworkspacedata

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "Alamofire",
6+
"repositoryURL": "https://github.com/Alamofire/Alamofire.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "4d19ad82f80cc71ff829b941ded114c56f4f604c",
10+
"version": "5.4.2"
11+
}
12+
},
13+
{
14+
"package": "BigInt",
15+
"repositoryURL": "https://github.com/attaswift/BigInt.git",
16+
"state": {
17+
"branch": null,
18+
"revision": "018a5925f60f9e0523edd261de394a0898fe95b7",
19+
"version": "3.1.0"
20+
}
21+
},
22+
{
23+
"package": "Bits",
24+
"repositoryURL": "https://github.com/vapor/bits.git",
25+
"state": {
26+
"branch": null,
27+
"revision": "03079476b04139a8b744ad96f975176df5ae12bc",
28+
"version": "1.1.1"
29+
}
30+
},
31+
{
32+
"package": "Core",
33+
"repositoryURL": "https://github.com/vapor/core.git",
34+
"state": {
35+
"branch": null,
36+
"revision": "aa15871311b497a24a7f0e96b1ae6865dd600818",
37+
"version": "2.2.1"
38+
}
39+
},
40+
{
41+
"package": "CryptoSwift",
42+
"repositoryURL": "https://github.com/krzyzanowskim/CryptoSwift.git",
43+
"state": {
44+
"branch": null,
45+
"revision": "5669f222e46c8134fb1f399c745fa6882b43532e",
46+
"version": "1.3.8"
47+
}
48+
},
49+
{
50+
"package": "DateToolsSwift",
51+
"repositoryURL": "https://github.com/maniramezan/DateTools.git",
52+
"state": {
53+
"branch": "mani_swiftpm_5_3",
54+
"revision": "b7f0415ecb9a2b684fc53a2e4093fc09d368356a",
55+
"version": null
56+
}
57+
},
58+
{
59+
"package": "Debugging",
60+
"repositoryURL": "https://github.com/vapor/debugging.git",
61+
"state": {
62+
"branch": null,
63+
"revision": "fc5a27d6eb236141dc24e5f14eedaa2e035ae7b3",
64+
"version": "1.1.1"
65+
}
66+
},
67+
{
68+
"package": "EFQRCode",
69+
"repositoryURL": "https://github.com/EFPrefix/EFQRCode.git",
70+
"state": {
71+
"branch": null,
72+
"revision": "4a72d79f9cae6d2f189f768178cc8594b427c190",
73+
"version": "6.1.0"
74+
}
75+
},
76+
{
77+
"package": "Eureka",
78+
"repositoryURL": "https://github.com/xmartlabs/Eureka.git",
79+
"state": {
80+
"branch": null,
81+
"revision": "523af88efc83cdaf39b415446be1ca1529f5664d",
82+
"version": "5.3.3"
83+
}
84+
},
85+
{
86+
"package": "KeychainAccess",
87+
"repositoryURL": "https://github.com/kishikawakatsumi/KeychainAccess.git",
88+
"state": {
89+
"branch": null,
90+
"revision": "84e546727d66f1adc5439debad16270d0fdd04e7",
91+
"version": "4.2.2"
92+
}
93+
},
94+
{
95+
"package": "MarkdownKit",
96+
"repositoryURL": "https://github.com/bmoliveira/MarkdownKit.git",
97+
"state": {
98+
"branch": null,
99+
"revision": "828e99602285c9547ceb01a014bf2d0bd7bc545e",
100+
"version": "1.7.0"
101+
}
102+
},
103+
{
104+
"package": "OpenSSL",
105+
"repositoryURL": "https://github.com/krzyzanowskim/OpenSSL.git",
106+
"state": {
107+
"branch": null,
108+
"revision": "e88deedfc37501f03ae3a08b3b8cf497d0340197",
109+
"version": "1.1.1100"
110+
}
111+
},
112+
{
113+
"package": "Parchment",
114+
"repositoryURL": "https://github.com/rechsteiner/Parchment.git",
115+
"state": {
116+
"branch": null,
117+
"revision": "689ecaa80b7b0f712887ec87746f8598f2e12907",
118+
"version": "3.0.1"
119+
}
120+
},
121+
{
122+
"package": "ProcedureKit",
123+
"repositoryURL": "https://github.com/ProcedureKit/ProcedureKit.git",
124+
"state": {
125+
"branch": null,
126+
"revision": "a7fa565e648d90083c7f10c0c6be9bf249dcdbde",
127+
"version": "5.2.0"
128+
}
129+
},
130+
{
131+
"package": "PromiseKit",
132+
"repositoryURL": "https://github.com/mxcl/PromiseKit.git",
133+
"state": {
134+
"branch": null,
135+
"revision": "aea48ea1855f5d82e2dffa6027afce3aab8f3dd7",
136+
"version": "6.13.3"
137+
}
138+
},
139+
{
140+
"package": "QRCodeReader",
141+
"repositoryURL": "https://github.com/yannickl/QRCodeReader.swift.git",
142+
"state": {
143+
"branch": null,
144+
"revision": "5020b5a47199d8ba80c83a4b4fafd70e9dc9dc7f",
145+
"version": "10.1.1"
146+
}
147+
},
148+
{
149+
"package": "Random",
150+
"repositoryURL": "https://github.com/vapor-community/random.git",
151+
"state": {
152+
"branch": null,
153+
"revision": "d7c4397d125caba795d14d956efacfe2a27a63d0",
154+
"version": "1.2.0"
155+
}
156+
},
157+
{
158+
"package": "Reachability",
159+
"repositoryURL": "https://github.com/ashleymills/Reachability.swift",
160+
"state": {
161+
"branch": null,
162+
"revision": "c01bbdf2d633cf049ae1ed1a68a2020a8bda32e2",
163+
"version": "5.1.0"
164+
}
165+
},
166+
{
167+
"package": "RNCryptor",
168+
"repositoryURL": "https://github.com/RNCryptor/RNCryptor.git",
169+
"state": {
170+
"branch": null,
171+
"revision": "5e3bbf44f08bf90049537cb8902d8f4fa911a79a",
172+
"version": "5.1.0"
173+
}
174+
},
175+
{
176+
"package": "SipHash",
177+
"repositoryURL": "https://github.com/attaswift/SipHash",
178+
"state": {
179+
"branch": null,
180+
"revision": "e325083424688055363bbfcb7f1a440d7d7a1bae",
181+
"version": "1.2.2"
182+
}
183+
},
184+
{
185+
"package": "Starscream",
186+
"repositoryURL": "https://github.com/daltoniam/Starscream.git",
187+
"state": {
188+
"branch": null,
189+
"revision": "e6b65c6d9077ea48b4a7bdda8994a1d3c6969c8d",
190+
"version": "3.1.1"
191+
}
192+
},
193+
{
194+
"package": "swift-nio-zlib-support",
195+
"repositoryURL": "https://github.com/apple/swift-nio-zlib-support.git",
196+
"state": {
197+
"branch": null,
198+
"revision": "37760e9a52030bb9011972c5213c3350fa9d41fd",
199+
"version": "1.0.0"
200+
}
201+
},
202+
{
203+
"package": "Sodium",
204+
"repositoryURL": "https://github.com/jedisct1/swift-sodium.git",
205+
"state": {
206+
"branch": null,
207+
"revision": "4f9164a0a2c9a6a7ff53a2833d54a5c79c957342",
208+
"version": "0.9.1"
209+
}
210+
},
211+
{
212+
"package": "swift_qrcodejs",
213+
"repositoryURL": "https://github.com/ApolloZhu/swift_qrcodejs.git",
214+
"state": {
215+
"branch": null,
216+
"revision": "374dc7f7b9e76c6aeb393f6a84590c6d387e1ecb",
217+
"version": "2.2.2"
218+
}
219+
},
220+
{
221+
"package": "Swinject",
222+
"repositoryURL": "https://github.com/Swinject/Swinject.git",
223+
"state": {
224+
"branch": null,
225+
"revision": "8a76d2c74bafbb455763487cc6a08e91bad1f78b",
226+
"version": "2.7.1"
227+
}
228+
},
229+
{
230+
"package": "Web3swift",
231+
"repositoryURL": "https://github.com/skywinder/web3swift.git",
232+
"state": {
233+
"branch": null,
234+
"revision": "b060704c425ceb5b4c87ff8d8a2a9f0c0ae3bdc5",
235+
"version": "2.2.2"
236+
}
237+
}
238+
]
239+
},
240+
"version": 1
241+
}

Adamant/Models/BTCRawTransaction.swift

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,15 @@ extension BTCRawTransaction: Decodable {
154154

155155
let possibleDoubleSpend = (try? container.decode(Bool.self, forKey: .possibleDoubleSpend)) ?? false
156156

157-
guard
158-
!possibleDoubleSpend,
159-
let timeInterval = try? container.decode(TimeInterval.self, forKey: .date) else {
160-
isDoubleSpend = true
157+
// MARK: Optionals for new transactions
158+
if let timeInterval = try? container.decode(TimeInterval.self, forKey: .date) {
159+
date = Date(timeIntervalSince1970: timeInterval)
160+
} else {
161161
date = nil
162+
}
163+
164+
guard !possibleDoubleSpend else {
165+
isDoubleSpend = true
162166
valueIn = 0
163167
valueOut = 0
164168
fee = 0
@@ -169,15 +173,6 @@ extension BTCRawTransaction: Decodable {
169173
return
170174
}
171175

172-
date = Date(timeIntervalSince1970: timeInterval)
173-
174-
// // MARK: Optionals for new transactions
175-
// if let timeInterval = try? container.decode(TimeInterval.self, forKey: .date) {
176-
// date = Date(timeIntervalSince1970: timeInterval)
177-
// } else {
178-
// date = nil
179-
// }
180-
181176
confirmations = try? container.decode(Int.self, forKey: .confirmations)
182177
blockHash = try? container.decode(String.self, forKey: .blockHash)
183178

Adamant/Models/LskAccount.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010
import BigInt
11-
import Lisk
11+
import LiskKit
1212

1313
struct LskAccount {
1414
let keys: KeyPair

Adamant/ServiceProtocols/LskApiService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
import Foundation
10-
import Lisk
10+
import LiskKit
1111

1212
// MARK: - Notifications
1313
extension Notification.Name {

Adamant/Services/AdamantAccountService.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ class AdamantAccountService: AccountService {
153153
NotificationCenter.default.removeObserver(self, name: Notification.Name.AdamantReachabilityMonitor.reachabilityChanged, object: nil)
154154

155155
case .failure(let error):
156-
self.dialogService.showRichError(error: error)
156+
// self.dialogService.showRichError(error: error)
157+
print(error)
157158
}
158159
}
159160
}

0 commit comments

Comments
 (0)