Skip to content

Commit 5908318

Browse files
committed
Merge branch 'release/0.1.2'
2 parents 14dd7cf + 6d63419 commit 5908318

Some content is hidden

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

43 files changed

+437
-64
lines changed

Adamant.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
E93580DD20160BD30057FC2E /* KnownContactsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = E93580DC20160BD30057FC2E /* KnownContactsService.swift */; };
2727
E93EFE13200D1156000BB482 /* ChatViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E93EFE12200D1156000BB482 /* ChatViewController.swift */; };
2828
E948E03B20235E2300975D6B /* SettingsRoutes.swift in Sources */ = {isa = PBXBuildFile; fileRef = E948E03A20235E2300975D6B /* SettingsRoutes.swift */; };
29+
E948E0482024F02700975D6B /* Footer.xib in Resources */ = {isa = PBXBuildFile; fileRef = E948E0472024F02700975D6B /* Footer.xib */; };
2930
E95F856520067A030070534A /* GlobalConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E95F856420067A030070534A /* GlobalConstants.swift */; };
3031
E95F85692006AB9D0070534A /* NormalizedTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = E95F85682006AB9D0070534A /* NormalizedTransaction.swift */; };
3132
E95F856B200789450070534A /* JSModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = E95F856A200789450070534A /* JSModels.swift */; };
@@ -163,6 +164,7 @@
163164
E93580DC20160BD30057FC2E /* KnownContactsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KnownContactsService.swift; sourceTree = "<group>"; };
164165
E93EFE12200D1156000BB482 /* ChatViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatViewController.swift; sourceTree = "<group>"; };
165166
E948E03A20235E2300975D6B /* SettingsRoutes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsRoutes.swift; sourceTree = "<group>"; };
167+
E948E0472024F02700975D6B /* Footer.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Footer.xib; sourceTree = "<group>"; };
166168
E95F856420067A030070534A /* GlobalConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalConstants.swift; sourceTree = "<group>"; };
167169
E95F85682006AB9D0070534A /* NormalizedTransaction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NormalizedTransaction.swift; sourceTree = "<group>"; };
168170
E95F856A200789450070534A /* JSModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSModels.swift; sourceTree = "<group>"; };
@@ -411,6 +413,7 @@
411413
E9E7CDB22002B9FB00DFC4DB /* LoginRoutes.swift */,
412414
E919479B2000102E001362F8 /* LoginViewController.swift */,
413415
E9B6CC47201753D000486EA1 /* Header.xib */,
416+
E948E0472024F02700975D6B /* Footer.xib */,
414417
);
415418
path = Login;
416419
sourceTree = "<group>";
@@ -664,6 +667,7 @@
664667
E95F857D2008C8CB0070534A /* Chats.storyboard in Resources */,
665668
E9EC3418200524CA00C0E546 /* Exo+2_400_normal.ttf in Resources */,
666669
E93580D9201607DA0057FC2E /* knownContacts.json in Resources */,
670+
E948E0482024F02700975D6B /* Footer.xib in Resources */,
667671
E9E7CDA72002AECA00DFC4DB /* Account.storyboard in Resources */,
668672
);
669673
runOnlyForDeploymentPostprocessing = 0;

Adamant/AppDelegate.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1919

2020
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
2121

22-
// MARK: Initiating Swinject
22+
// MARK: 1. Initiating Swinject
2323
let container = SwinjectStoryboard.defaultContainer
2424
Container.loggingFunction = nil // Logging currently not supported with SwinjectStoryboards.
2525
container.registerAdamantServices()
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828
container.registerAdamantChatsStory()
2929

3030

31-
// MARK: Prepare UI
31+
// MARK: 2. Prepare UI
3232
self.window = UIWindow(frame: UIScreen.main.bounds)
3333
self.window!.rootViewController = SwinjectStoryboard.create(name: "Main", bundle: nil).instantiateInitialViewController()
3434
self.window!.rootViewController?.view.backgroundColor = .white
@@ -49,7 +49,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
4949
}
5050

5151

52-
// MARK: Initiate login
52+
// MARK: 3. Initiate login
5353
guard let accountService = container.resolve(AccountService.self) else {
5454
fatalError("Failed to get AccountService")
5555
}
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{
2+
"images" : [
3+
{
4+
"size" : "20x20",
5+
"idiom" : "iphone",
6+
"filename" : "adamant-20@2x.png",
7+
"scale" : "2x"
8+
},
9+
{
10+
"size" : "20x20",
11+
"idiom" : "iphone",
12+
"filename" : "adamant-20@3x.png",
13+
"scale" : "3x"
14+
},
15+
{
16+
"size" : "29x29",
17+
"idiom" : "iphone",
18+
"filename" : "adamant-29@2x.png",
19+
"scale" : "2x"
20+
},
21+
{
22+
"size" : "29x29",
23+
"idiom" : "iphone",
24+
"filename" : "adamant-29@3x.png",
25+
"scale" : "3x"
26+
},
27+
{
28+
"size" : "40x40",
29+
"idiom" : "iphone",
30+
"filename" : "adamant-40@2x.png",
31+
"scale" : "2x"
32+
},
33+
{
34+
"size" : "40x40",
35+
"idiom" : "iphone",
36+
"filename" : "adamant-40@3x.png",
37+
"scale" : "3x"
38+
},
39+
{
40+
"size" : "60x60",
41+
"idiom" : "iphone",
42+
"filename" : "adamant-60@2x.png",
43+
"scale" : "2x"
44+
},
45+
{
46+
"size" : "60x60",
47+
"idiom" : "iphone",
48+
"filename" : "adamant-60@3x.png",
49+
"scale" : "3x"
50+
},
51+
{
52+
"size" : "20x20",
53+
"idiom" : "ipad",
54+
"filename" : "adamant-20.png",
55+
"scale" : "1x"
56+
},
57+
{
58+
"size" : "20x20",
59+
"idiom" : "ipad",
60+
"filename" : "adamant-20@2x.png",
61+
"scale" : "2x"
62+
},
63+
{
64+
"size" : "29x29",
65+
"idiom" : "ipad",
66+
"filename" : "adamant-29.png",
67+
"scale" : "1x"
68+
},
69+
{
70+
"size" : "29x29",
71+
"idiom" : "ipad",
72+
"filename" : "adamant-29@2x.png",
73+
"scale" : "2x"
74+
},
75+
{
76+
"size" : "40x40",
77+
"idiom" : "ipad",
78+
"filename" : "adamant-40.png",
79+
"scale" : "1x"
80+
},
81+
{
82+
"size" : "40x40",
83+
"idiom" : "ipad",
84+
"filename" : "adamant-40@2x.png",
85+
"scale" : "2x"
86+
},
87+
{
88+
"size" : "76x76",
89+
"idiom" : "ipad",
90+
"filename" : "adamant-76.png",
91+
"scale" : "1x"
92+
},
93+
{
94+
"size" : "76x76",
95+
"idiom" : "ipad",
96+
"filename" : "adamant-76@2x.png",
97+
"scale" : "2x"
98+
},
99+
{
100+
"size" : "83.5x83.5",
101+
"idiom" : "ipad",
102+
"filename" : "adamant-83.5@2x.png",
103+
"scale" : "2x"
104+
},
105+
{
106+
"size" : "1024x1024",
107+
"idiom" : "ios-marketing",
108+
"filename" : "adamant-1024.png",
109+
"scale" : "1x"
110+
}
111+
],
112+
"info" : {
113+
"version" : 1,
114+
"author" : "xcode"
115+
}
116+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{
2+
"images" : [
3+
{
4+
"size" : "20x20",
5+
"idiom" : "iphone",
6+
"filename" : "adamant-app-logo-20@2x.png",
7+
"scale" : "2x"
8+
},
9+
{
10+
"size" : "20x20",
11+
"idiom" : "iphone",
12+
"filename" : "adamant-app-logo-20@3x.png",
13+
"scale" : "3x"
14+
},
15+
{
16+
"size" : "29x29",
17+
"idiom" : "iphone",
18+
"filename" : "adamant-app-logo-29@2x.png",
19+
"scale" : "2x"
20+
},
21+
{
22+
"size" : "29x29",
23+
"idiom" : "iphone",
24+
"filename" : "adamant-app-logo-29@3x.png",
25+
"scale" : "3x"
26+
},
27+
{
28+
"size" : "40x40",
29+
"idiom" : "iphone",
30+
"filename" : "adamant-app-logo-40@2x.png",
31+
"scale" : "2x"
32+
},
33+
{
34+
"size" : "40x40",
35+
"idiom" : "iphone",
36+
"filename" : "adamant-app-logo-40@3x.png",
37+
"scale" : "3x"
38+
},
39+
{
40+
"size" : "60x60",
41+
"idiom" : "iphone",
42+
"filename" : "adamant-app-logo-60@2x.png",
43+
"scale" : "2x"
44+
},
45+
{
46+
"size" : "60x60",
47+
"idiom" : "iphone",
48+
"filename" : "adamant-app-logo-60@3x.png",
49+
"scale" : "3x"
50+
},
51+
{
52+
"size" : "20x20",
53+
"idiom" : "ipad",
54+
"filename" : "adamant-app-logo-20.png",
55+
"scale" : "1x"
56+
},
57+
{
58+
"size" : "20x20",
59+
"idiom" : "ipad",
60+
"filename" : "adamant-app-logo-20@2x.png",
61+
"scale" : "2x"
62+
},
63+
{
64+
"size" : "29x29",
65+
"idiom" : "ipad",
66+
"filename" : "adamant-app-logo-29.png",
67+
"scale" : "1x"
68+
},
69+
{
70+
"size" : "29x29",
71+
"idiom" : "ipad",
72+
"filename" : "adamant-app-logo-29@2x.png",
73+
"scale" : "2x"
74+
},
75+
{
76+
"size" : "40x40",
77+
"idiom" : "ipad",
78+
"filename" : "adamant-app-logo-40.png",
79+
"scale" : "1x"
80+
},
81+
{
82+
"size" : "40x40",
83+
"idiom" : "ipad",
84+
"filename" : "adamant-app-logo-40@2x.png",
85+
"scale" : "2x"
86+
},
87+
{
88+
"size" : "76x76",
89+
"idiom" : "ipad",
90+
"filename" : "adamant-app-logo-76.png",
91+
"scale" : "1x"
92+
},
93+
{
94+
"size" : "76x76",
95+
"idiom" : "ipad",
96+
"filename" : "adamant-app-logo-76@2x.png",
97+
"scale" : "2x"
98+
},
99+
{
100+
"size" : "83.5x83.5",
101+
"idiom" : "ipad",
102+
"filename" : "adamant-app-logo-83.5@2x.png",
103+
"scale" : "2x"
104+
},
105+
{
106+
"size" : "1024x1024",
107+
"idiom" : "ios-marketing",
108+
"filename" : "adamant-app-logo-1024.png",
109+
"scale" : "1x"
110+
}
111+
],
112+
"info" : {
113+
"version" : 1,
114+
"author" : "xcode"
115+
}
116+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

Adamant/Helpers/AdamantUtilities.swift

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@
99
import Foundation
1010

1111
class AdamantUtilities {
12+
// MARK: Application version
13+
static var applicationVersion: String = {
14+
if let infoDictionary = Bundle.main.infoDictionary,
15+
let version = infoDictionary["CFBundleShortVersionString"] as? String,
16+
let build = infoDictionary["CFBundleVersion"] as? String {
17+
return "\(version) (\(build))"
18+
}
19+
20+
return ""
21+
}()
22+
1223
private init() { }
1324
}
1425

@@ -41,6 +52,13 @@ extension AdamantUtilities {
4152
static func from(uInt: UInt) -> Double {
4253
return Double(uInt) * currencyShift
4354
}
55+
56+
static func validateAmount(amount: Double) -> Bool {
57+
if amount < currencyShift {
58+
return false
59+
}
60+
return true
61+
}
4462
}
4563

4664

@@ -99,7 +117,7 @@ extension AdamantUtilities {
99117
}
100118

101119

102-
// MARK: Hex
120+
// MARK: - Hex
103121
extension AdamantUtilities {
104122
static func getHexString(from bytes: [UInt8]) -> String {
105123
if bytes.count > 0 {

Adamant/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>0.1.1</string>
20+
<string>0.1.2</string>
2121
<key>CFBundleVersion</key>
22-
<string>2</string>
22+
<string>3</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>UIAppFonts</key>

Adamant/Stories/Account/Account.storyboard

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
4242
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
4343
<subviews>
44-
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="VuM-O9-pxN">
44+
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="VuM-O9-pxN">
4545
<rect key="frame" x="0.0" y="64" width="375" height="554"/>
46-
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
46+
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
4747
</tableView>
4848
</subviews>
4949
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -158,6 +158,6 @@
158158
</scene>
159159
</scenes>
160160
<resources>
161-
<image name="wallet_tab" width="25" height="24"/>
161+
<image name="wallet_tab" width="23" height="21"/>
162162
</resources>
163163
</document>

0 commit comments

Comments
 (0)