Skip to content

Commit 894bdd4

Browse files
authored
Merge pull request #13 from BanklessDAO/beta-fixes-n-improvements
Round of fixes and improvements to address user feedback
2 parents 82d17fd + 1ac0d96 commit 894bdd4

46 files changed

Lines changed: 173 additions & 97 deletions

File tree

Some content is hidden

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

Bankless.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2419,7 +2419,7 @@
24192419
buildSettings = {
24202420
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
24212421
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
2422-
CODE_SIGN_IDENTITY = "iPhone Distribution";
2422+
CODE_SIGN_IDENTITY = "iPhone Developer";
24232423
CODE_SIGN_STYLE = Manual;
24242424
CURRENT_PROJECT_VERSION = 20211206095730;
24252425
DEVELOPMENT_TEAM = T55G7JLVK5;
@@ -2432,7 +2432,7 @@
24322432
MARKETING_VERSION = 0.2.1;
24332433
PRODUCT_BUNDLE_IDENTIFIER = com.bankless.app;
24342434
PRODUCT_NAME = "$(TARGET_NAME)";
2435-
PROVISIONING_PROFILE_SPECIFIER = Bankless_AppStore_2021120601;
2435+
PROVISIONING_PROFILE_SPECIFIER = Bankless_Dev_2021120801;
24362436
SWIFT_VERSION = 5.0;
24372437
TARGETED_DEVICE_FAMILY = 1;
24382438
};
@@ -2506,7 +2506,7 @@
25062506
buildSettings = {
25072507
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
25082508
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
2509-
CODE_SIGN_IDENTITY = "iPhone Distribution";
2509+
CODE_SIGN_IDENTITY = "iPhone Developer";
25102510
CODE_SIGN_STYLE = Manual;
25112511
CURRENT_PROJECT_VERSION = 20211206095730;
25122512
DEVELOPMENT_TEAM = T55G7JLVK5;
@@ -2519,7 +2519,7 @@
25192519
MARKETING_VERSION = 0.2.1;
25202520
PRODUCT_BUNDLE_IDENTIFIER = com.bankless.app;
25212521
PRODUCT_NAME = "$(TARGET_NAME)";
2522-
PROVISIONING_PROFILE_SPECIFIER = Bankless_AppStore_2021120601;
2522+
PROVISIONING_PROFILE_SPECIFIER = Bankless_Dev_2021120801;
25232523
SWIFT_VERSION = 5.0;
25242524
TARGETED_DEVICE_FAMILY = 1;
25252525
};
@@ -2816,7 +2816,7 @@
28162816
buildSettings = {
28172817
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
28182818
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
2819-
CODE_SIGN_IDENTITY = "iPhone Distribution";
2819+
CODE_SIGN_IDENTITY = "iPhone Developer";
28202820
CODE_SIGN_STYLE = Manual;
28212821
CURRENT_PROJECT_VERSION = 20211206095730;
28222822
DEVELOPMENT_TEAM = T55G7JLVK5;
@@ -2829,7 +2829,7 @@
28292829
MARKETING_VERSION = 0.2.1;
28302830
PRODUCT_BUNDLE_IDENTIFIER = com.bankless.app;
28312831
PRODUCT_NAME = "$(TARGET_NAME)";
2832-
PROVISIONING_PROFILE_SPECIFIER = Bankless_AppStore_2021120601;
2832+
PROVISIONING_PROFILE_SPECIFIER = Bankless_Dev_2021120801;
28332833
SWIFT_VERSION = 5.0;
28342834
TARGETED_DEVICE_FAMILY = 1;
28352835
};

Bankless.xcodeproj/xcshareddata/xcschemes/Bankless.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</Testables>
3232
</TestAction>
3333
<LaunchAction
34-
buildConfiguration = "Release Prod"
34+
buildConfiguration = "Debug Prod"
3535
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3636
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
3737
launchStyle = "0"

Bankless/Data/Models/AttendanceToken.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ struct AttendanceToken: Codable {
3737

3838
self.id = try! container.decode(String.self, forKey: .tokenId)
3939
self.ownerAddress = try! container.decode(String.self, forKey: .owner)
40-
self.mintedAt = Date(
41-
dateString: try! container.decode(String.self, forKey: .created),
42-
format: "yyyy-MM-dd HH:mm:ss"
43-
)
40+
41+
if let dateString = try? container.decode(String.self, forKey: .created) {
42+
self.mintedAt = Date(
43+
dateString: dateString,
44+
format: "yyyy-MM-dd HH:mm:ss"
45+
)
46+
} else {
47+
self.mintedAt = Date()
48+
}
4449

4550
let eventContainer = try! container
4651
.nestedContainer(keyedBy: CodingKey.Event.self, forKey: .event)

Bankless/Presentation/Base/BaseTableViewCell.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ class TableViewCellFoundation<VM: ViewModel>: UITableViewCell {
6060
// MARK: - Setters -
6161

6262
func set(viewModel: VM) {
63+
(self.viewModel as? ViewModelFoundation)?.disposer = DisposeBag()
64+
6365
self.viewModel = viewModel
6466
bindViewModel()
6567
}

Bankless/Presentation/Behaviour/ERC20AmountPresentationBehaviour.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,22 @@ extension ERC20AmountPresentationBehaviour {
2929
func amountString() -> String {
3030
let amountString = String(amount)
3131

32-
return String(
32+
let scaledAmountString = String(
3333
amountString[
3434
amountString.startIndex
3535
..< .init(utf16Offset: amountString.count - Self.decimalPlaces, in: amountString)
3636
]
3737
)
38+
39+
guard let intAmount = Int(scaledAmountString) else {
40+
return scaledAmountString
41+
}
42+
43+
let formatter = NumberFormatter()
44+
formatter.locale = .current
45+
formatter.usesGroupingSeparator = true
46+
formatter.groupingSize = 3
47+
48+
return formatter.string(from: NSNumber(value: intAmount)) ?? scaledAmountString
3849
}
3950
}

Bankless/Presentation/Hierarchy/Achievements/Collection/AchievementCollectionViewModel.swift

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,26 @@ final class AchievementCollectionViewModel: BaseViewModel,
8181
return Output(
8282
isRefreshing: activityTracker.asDriver(),
8383
title: .just(AchievementCollectionViewModel.collectionTitle),
84-
attendanceTokensSectionTitle: .just(
85-
AchievementCollectionViewModel.attendanceTokensSectionTitle
86-
),
84+
attendanceTokensSectionTitle: self
85+
.attendanceTokensSectionTitle(attendanceTokens: attendanceTokens)
86+
.asDriver(onErrorDriveWith: .empty()),
8787
attendanceTokenViewModels: attendanceTokenViewModels
8888
.asDriver(onErrorDriveWith: .empty())
8989
)
9090
}
9191

92+
// MARK: - Titles -
93+
94+
private func attendanceTokensSectionTitle(
95+
attendanceTokens: Observable<[AttendanceToken]>
96+
) -> Observable<String> {
97+
return attendanceTokens
98+
.map({ tokens in
99+
AchievementCollectionViewModel.attendanceTokensSectionTitle
100+
+ " (\(tokens.count))"
101+
})
102+
}
103+
92104
// MARK: - Timeline -
93105

94106
private func collectionItems(

Bankless/Presentation/Hierarchy/Achievements/Collection/AchievementsCollectionView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ extension AchievementCollectionView: GridCollectionViewLayoutDelegate {
226226
case 0:
227227
return Appearance.Text.Font.Header1.lineHeight * 2
228228
case 1:
229-
return Appearance.Text.Font.Title1.lineHeight * 2
229+
return Appearance.Text.Font.Title2.lineHeight
230230
default:
231231
return (collectionView.bounds.width / 3) - contentInsets.left
232232
}
@@ -241,7 +241,7 @@ extension AchievementCollectionView: GridCollectionViewLayoutDelegate {
241241
case 0:
242242
return Appearance.Text.Font.Header1.lineHeight * 2
243243
case 1:
244-
return Appearance.Text.Font.Title1.lineHeight * 2
244+
return Appearance.Text.Font.Title2.lineHeight
245245
default:
246246
return (collectionView.bounds.width / 3)
247247
}

Bankless/Presentation/Hierarchy/Achievements/Collection/Sections/Title/AchievementsTitleCell.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ class AchievementsTitleCell: UICollectionViewCell {
7272
title.height == Appearance.Text.Font.Header1.lineHeight
7373
title.edges == view.edges
7474
.inseted(by: .init(
75-
top: Appearance.contentInsets.top * 2,
76-
left: Appearance.contentInsets.left * 2,
77-
bottom: Appearance.contentInsets.bottom,
78-
right: Appearance.contentInsets.right * 2
75+
top: Appearance.contentInsets.top,
76+
left: Appearance.contentInsets.left,
77+
bottom: 0,
78+
right: Appearance.contentInsets.right
7979
))
8080
}
8181
}

Bankless/Presentation/Hierarchy/Common/Cells/BountyBoard/BountyListCell.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ class BountyListCell: BaseTableViewCell<BountyViewModel> {
3232

3333
private var card: BountyCard!
3434

35+
// MARK: - Lifecycle -
36+
37+
override func prepareForReuse() {
38+
super.prepareForReuse()
39+
card.disposer = DisposeBag()
40+
}
41+
3542
// MARK: - Setup -
3643

3744
override func setUpSubviews() {

Bankless/Presentation/Hierarchy/Common/SectionHeader/CollectionSectionHeaderCell.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class CollectionSectionHeaderCell: BaseCollectionViewCell<SectionHeaderViewModel
5959
backgroundColor = .backgroundBlack
6060

6161
titleLabel = UILabel()
62-
titleLabel.font = Appearance.Text.Font.Title1.font(bold: false)
62+
titleLabel.font = Appearance.Text.Font.Title2.font(bold: false)
6363
titleLabel.textColor = .secondaryWhite
6464
contentView.addSubview(titleLabel)
6565

@@ -70,15 +70,14 @@ class CollectionSectionHeaderCell: BaseCollectionViewCell<SectionHeaderViewModel
7070

7171
override func setUpConstraints() {
7272
constrain(titleLabel, expandButton, contentView) { title, expand, view in
73-
title.height == Appearance.Text.Font.Title1.lineHeight
74-
title.height == expand.height
73+
title.height == Appearance.Text.Font.Title2.lineHeight
7574
title.centerY == expand.centerY
7675
title.edges == view.edges
7776
.inseted(by: .init(
7877
top: 0,
79-
left: Appearance.contentInsets.left * 2,
80-
bottom: Appearance.contentInsets.bottom,
81-
right: Appearance.contentInsets.right * 2
78+
left: Appearance.contentInsets.left,
79+
bottom: 0,
80+
right: Appearance.contentInsets.right
8281
))
8382
}
8483

0 commit comments

Comments
 (0)