Skip to content

Commit f6a8688

Browse files
committed
Merge branch 'release/1.2'
2 parents 065660f + 80f2ad5 commit f6a8688

File tree

220 files changed

+14914
-3015
lines changed

Some content is hidden

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

220 files changed

+14914
-3015
lines changed

Adamant.xcodeproj/project.pbxproj

Lines changed: 442 additions & 118 deletions
Large diffs are not rendered by default.

Adamant.xcodeproj/xcshareddata/xcbaselines/E9EC344320066D4A00C0E546.xcbaseline/2F5A2BDA-A1C8-4C51-B0EB-6802181570B4.plist

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,39 @@
3737
</dict>
3838
</dict>
3939
</dict>
40+
<key>NativeCoreTests</key>
41+
<dict>
42+
<key>testPerformanceHashForPassphrase()</key>
43+
<dict>
44+
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
45+
<dict>
46+
<key>baselineAverage</key>
47+
<real>1.179</real>
48+
<key>baselineIntegrationDisplayName</key>
49+
<string>Local Baseline</string>
50+
</dict>
51+
</dict>
52+
<key>testPerformanceKeypairForPassphrase()</key>
53+
<dict>
54+
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
55+
<dict>
56+
<key>baselineAverage</key>
57+
<real>1.1729</real>
58+
<key>baselineIntegrationDisplayName</key>
59+
<string>Local Baseline</string>
60+
</dict>
61+
</dict>
62+
<key>testPerformanceSignTransaction()</key>
63+
<dict>
64+
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
65+
<dict>
66+
<key>baselineAverage</key>
67+
<real>0.0018654</real>
68+
<key>baselineIntegrationDisplayName</key>
69+
<string>Local Baseline</string>
70+
</dict>
71+
</dict>
72+
</dict>
4073
</dict>
4174
</dict>
4275
</plist>

Adamant.xcodeproj/xcshareddata/xcschemes/Adamant.Dev.BackgroundFetch.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0940"
3+
LastUpgradeVersion = "1010"
44
version = "2.0">
55
<BuildAction
66
parallelizeBuildables = "YES"

Adamant.xcodeproj/xcshareddata/xcschemes/Adamant.Dev.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0940"
3+
LastUpgradeVersion = "1010"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0940"
3+
LastUpgradeVersion = "1010"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Adamant.xcodeproj/xcshareddata/xcschemes/Adamant.Test.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0940"
3+
LastUpgradeVersion = "1010"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Adamant/AppDelegate.swift

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,20 @@ extension StoreKey {
3636

3737
// MARK: - Resources
3838
struct AdamantResources {
39-
static let jsCore = Bundle.main.url(forResource: "adamant-core", withExtension: "js")!
40-
static let coreDataModel = Bundle.main.url(forResource: "ChatModels", withExtension: "momd")!
39+
static let coreDataModel = Bundle.main.url(forResource: "Adamant", withExtension: "momd")!
4140

4241
static let nodes: [Node] = [
43-
Node(scheme: .https, host: "endless.adamant.im", port: nil),
44-
Node(scheme: .https, host: "clown.adamant.im", port: nil),
45-
Node(scheme: .https, host: "lake.adamant.im", port: nil),
46-
Node(scheme: .http, host: "80.211.177.181", port: nil)
42+
Node(scheme: .https, host: "endless.adamant.im", port: nil),
43+
Node(scheme: .https, host: "clown.adamant.im", port: nil),
44+
Node(scheme: .https, host: "lake.adamant.im", port: nil),
45+
// Node(scheme: .http, host: "80.211.177.181", port: nil), // Bugged one
46+
// Node(scheme: .http, host: "163.172.132.38", port: 36667) // Testnet
4747
]
48+
49+
static let ethServers = [
50+
"https://ethnode1.adamant.im/"
51+
// "https://ropsten.infura.io/" // test network
52+
]
4853

4954
// Addresses
5055
static let supportEmail = "ios@adamant.im"
@@ -61,6 +66,11 @@ struct AdamantResources {
6166

6267
private init() {}
6368
}
69+
70+
// Explorers
71+
static let adamantExplorerAddress = "https://explorer.adamant.im/tx/"
72+
static let ethereumExplorerAddress = "https://etherscan.io/tx/"
73+
// static let ethereumExplorerAddress = "https://ropsten.etherscan.io/tx/" // Testnet
6474

6575
private init() {}
6676
}
@@ -81,7 +91,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
8191

8292
// MARK: - Lifecycle
8393

84-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
94+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
8595
// MARK: 1. Initiating Swinject
8696
container = Container()
8797
container.registerAdamantServices()
@@ -200,7 +210,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
200210
}
201211

202212
// MARK: 7. Welcome messages
203-
NotificationCenter.default.addObserver(forName: Notification.Name.AdamantChatsProvider.initialSyncFinished, object: nil, queue: OperationQueue.main, using: handleWelcomeMessages)
213+
NotificationCenter.default.addObserver(forName: Notification.Name.AdamantChatsProvider.initiallySyncedChanged, object: nil, queue: OperationQueue.main, using: handleWelcomeMessages)
204214

205215
return true
206216
}
@@ -322,7 +332,7 @@ extension AppDelegate {
322332
container.registerAdamantBackgroundFetchServices()
323333

324334
guard let notificationsService = container.resolve(NotificationsService.self) else {
325-
UIApplication.shared.setMinimumBackgroundFetchInterval(UIApplicationBackgroundFetchIntervalNever)
335+
UIApplication.shared.setMinimumBackgroundFetchInterval(UIApplication.backgroundFetchIntervalNever)
326336
completionHandler(.failed)
327337
return
328338
}
@@ -378,6 +388,10 @@ extension AppDelegate {
378388
// MARK: - Welcome messages
379389
extension AppDelegate {
380390
private func handleWelcomeMessages(notification: Notification) {
391+
guard let synced = notification.userInfo?[AdamantUserInfoKey.ChatProvider.initiallySynced] as? Bool, synced else {
392+
return
393+
}
394+
381395
guard let stack = container.resolve(CoreDataStack.self), let chatProvider = container.resolve(ChatsProvider.self) else {
382396
fatalError("Whoa...")
383397
}
@@ -397,7 +411,14 @@ extension AppDelegate {
397411
date: Date.adamantNullDate,
398412
unread: unread,
399413
silent: welcome.silentNotification,
400-
completion: { _ in })
414+
showsChatroom: true,
415+
completion: { result in
416+
guard case let .failure(error) = result else {
417+
return
418+
}
419+
420+
print("ERROR showing welcome message: \(error.message)")
421+
})
401422
}
402423

403424
if let ico = AdamantContacts.adamantIco.messages["chats.ico_message"] {
@@ -406,7 +427,14 @@ extension AppDelegate {
406427
date: Date.adamantNullDate,
407428
unread: unread,
408429
silent: ico.silentNotification,
409-
completion: { _ in })
430+
showsChatroom: true,
431+
completion: { result in
432+
guard case let .failure(error) = result else {
433+
return
434+
}
435+
436+
print("ERROR showing welcome message: \(error.message)")
437+
})
410438
}
411439
}
412440
}
Loading
Loading
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "Attachment.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "Attachment@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "Attachment@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
},
23+
"properties" : {
24+
"template-rendering-intent" : "template"
25+
}
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "SendMoney.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "SendMoney@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "SendMoney@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
},
23+
"properties" : {
24+
"template-rendering-intent" : "template"
25+
}
26+
}
Loading
Loading
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "adamant_token.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "adamant_token@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "adamant_token@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
Loading
Loading
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "eth_token.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "eth_token@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "eth_token@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
Loading
Loading
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "wallet_lsk.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "wallet_lsk@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "wallet_lsk@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
Loading
Loading
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "row_Notifications.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "row_Notifications@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "row_Notifications@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
},
23+
"properties" : {
24+
"template-rendering-intent" : "template"
25+
}
26+
}
Loading
Loading
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "row_QR.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "row_QR@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "row_QR@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
},
23+
"properties" : {
24+
"template-rendering-intent" : "template"
25+
}
26+
}
Loading
Loading
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "row_faceid.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "row_faceid@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "row_faceid@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
},
23+
"properties" : {
24+
"template-rendering-intent" : "template"
25+
}
26+
}
Loading
Loading
Loading

0 commit comments

Comments
 (0)