Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.1.0 release #657

Merged
merged 85 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
9f39c99
chore: refactor DPWelcomeView to Swift
Syn-McJ Dec 1, 2023
53660bd
chore: split DPWelcome and DPVoting views
Syn-McJ Dec 5, 2023
a87f764
fix: update voting panel on home view launch
Syn-McJ Dec 6, 2023
9b4dfab
feat: voting on/off switch
Syn-McJ Dec 7, 2023
9f57e0e
fix: disable voting entry points after voting period is ended
Syn-McJ Dec 7, 2023
cdc2beb
fix: voting filters in dark mode
Syn-McJ Dec 7, 2023
38372b2
fix: hide back button on a root vc
Syn-McJ Dec 8, 2023
3fec4b2
Merge pull request #633 from dashpay/release/8.0.0
pankcuf Dec 8, 2023
b6866bc
chore: disable Uphold and Coinbase
Syn-McJ Dec 11, 2023
d01b36d
chore: don't start CoinbaseObjcWrapper
Syn-McJ Dec 11, 2023
86cd675
Merge pull request #635 from Syn-McJ/chore/disable-coinbase-uphold
pankcuf Dec 11, 2023
d365959
fix: count HPMN as 4 virtual masternodes
Syn-McJ Dec 18, 2023
b3d5528
Merge branch 'release/8.0.0' into fix/crowdnode-apy
Syn-McJ Dec 19, 2023
c62f658
Merge pull request #636 from Syn-McJ/feat/voting-switch
Syn-McJ Dec 19, 2023
15333d6
test: virtual masternodes
Syn-McJ Dec 19, 2023
a69032f
feat: capabilities check prior to transfer
Syn-McJ Jan 6, 2024
e918458
chore: cleanup unused/unneeded code
Syn-McJ Jan 6, 2024
c12017e
Merge pull request #637 from Syn-McJ/fix/uphold-withdrawals
Syn-McJ Jan 16, 2024
052bbe9
fix: coinbase crash
Syn-McJ Jan 18, 2024
855ee00
fix: CrowdNode APY calculation
Syn-McJ Jan 19, 2024
69888c4
fix: remove a-z sorting
Syn-McJ Jan 19, 2024
2b8e04a
fix: refresh filters after location permission is changed
Syn-McJ Jan 20, 2024
fdfb329
chore: bump version
Syn-McJ Jan 20, 2024
819bd88
fix: remove gift cards from filter description
Syn-McJ Jan 20, 2024
bcc1ead
Merge branch 'develop' into fix/explore-sorting
Syn-McJ Jan 22, 2024
7258682
Merge pull request #638 from Syn-McJ/fix/explore-sorting
Syn-McJ Jan 22, 2024
b54bd6e
Merge branch 'develop' into fix/crowdnode-apy
Syn-McJ Jan 23, 2024
db01fe3
Merge branch 'develop' into fix/crowdnode-apy
Syn-McJ Jan 23, 2024
8fa8e50
chore: cleanup
Syn-McJ Jan 23, 2024
e8b519b
Merge pull request #639 from Syn-McJ/fix/crowdnode-apy
Syn-McJ Jan 25, 2024
513815b
chore: rename Portal to BuySellPortal
Syn-McJ Mar 7, 2024
9ab9c06
chore: refactor ServiceDataProvider
Syn-McJ Mar 7, 2024
a79b330
feat: disable Coinbase for UK storefronts
Syn-McJ Mar 7, 2024
89eef0f
fix: topper default amount
Syn-McJ Mar 8, 2024
ab8df5e
Merge pull request #640 from Syn-McJ/chore/disable-coinbase-uk
Syn-McJ Mar 9, 2024
a675fab
Merge branch 'develop' into fix/topper-default-amount
Syn-McJ Mar 12, 2024
9b6ddd1
Merge pull request #641 from Syn-McJ/fix/topper-default-amount
Syn-McJ Mar 12, 2024
0ff4ec2
chore: migrate to v3 payment_methods
Syn-McJ Mar 20, 2024
35dc045
chore: disable auth limit check
Syn-McJ Mar 22, 2024
fcac115
Merge pull request #642 from Syn-McJ/chore/coinbase-payment-methods
Syn-McJ Mar 25, 2024
341e77f
fix: recheck APY whenever restoreState is called
Syn-McJ Mar 25, 2024
9da1b7e
Merge pull request #643 from Syn-McJ/fix/crowdnode-apy
Syn-McJ Mar 25, 2024
aa69720
chore: migrate DWToolsMenuViewController to Swift
Syn-McJ Mar 29, 2024
22ff67d
feat: refactor Tools menu into SwiftUI List
Syn-McJ Mar 31, 2024
adb7c38
feat: zenledger info UI
Syn-McJ Mar 31, 2024
ac95bb0
fix: showing bottom sheet on zenledger menu item tap:
Syn-McJ Apr 1, 2024
dd94b28
chore: cleanup
Syn-McJ Apr 1, 2024
cbcfad0
chore: remove extra VStack from tools menu
Syn-McJ Apr 1, 2024
6b8beb4
feat: zenledger API
Syn-McJ Apr 1, 2024
43c251a
feat: zenledger export
Syn-McJ Apr 2, 2024
b270f6a
Merge pull request #644 from Syn-McJ/feat/zenledger-info
Syn-McJ Apr 4, 2024
d9fc842
Merge branch 'develop' into feat/zenledger-export
Syn-McJ Apr 4, 2024
7c545b8
Merge pull request #645 from Syn-McJ/feat/zenledger-export
Syn-McJ Apr 4, 2024
df76351
fix: zenledger request text
Syn-McJ Apr 6, 2024
10fb868
feat: localization
Syn-McJ Apr 6, 2024
f85e3cd
chore: add and fill privacy plist
Syn-McJ Apr 9, 2024
d77a240
Merge pull request #646 from Syn-McJ/chore/privacy-plist
Syn-McJ Apr 10, 2024
1190ac3
feat: translations & version bump
Syn-McJ Apr 10, 2024
c84104c
fix: change fiat rate label for loading state
Syn-McJ Apr 20, 2024
7539073
fix: overflow crash
Syn-McJ Apr 23, 2024
2dcbe4a
Merge pull request #647 from Syn-McJ/release/8.1.0
Syn-McJ Apr 23, 2024
f1378e2
Merge pull request #649 from Syn-McJ/fix/rate-syncing
Syn-McJ Apr 25, 2024
818b7d0
Merge pull request #648 from Syn-McJ/fix/overflow-crash
Syn-McJ Apr 25, 2024
5e025d4
fix: report cached rates on ratesprovider init
Syn-McJ May 3, 2024
60e779b
Merge pull request #650 from Syn-McJ/feat/rates-cache
Syn-McJ May 7, 2024
1f167d1
feat: SwiftUI components for Button and Toast
Syn-McJ May 15, 2024
0ed30e4
chore: migrate DWHomeViewController to Swift
Syn-McJ May 15, 2024
cd8dbe8
fix: toast fixes
Syn-McJ May 15, 2024
50bb586
feat: show toast on rates fetch error
Syn-McJ May 17, 2024
1fd2137
feat: rates older than 30 min warning
Syn-McJ May 17, 2024
22469b6
feat: volatile rates warning
Syn-McJ May 17, 2024
49528e2
chore: cleanup
Syn-McJ May 19, 2024
05b1a71
chore: swiftUI components and fixes
Syn-McJ May 20, 2024
ac12b6f
feat: UK geoblock for Coinbase
Syn-McJ May 20, 2024
9a2fe21
fix: nil check
Syn-McJ May 21, 2024
4ed9a80
Merge pull request #651 from Syn-McJ/feat/stale-rates
Syn-McJ May 21, 2024
b1f7b56
chore: cleanup
Syn-McJ May 21, 2024
c7e8a1f
Merge branch 'develop' into chore/coinbase-uk-geoblock
Syn-McJ May 21, 2024
1fe81fa
fix: rate and home vc crash
Syn-McJ May 23, 2024
c9462a1
Merge pull request #652 from Syn-McJ/chore/coinbase-uk-geoblock
Syn-McJ May 28, 2024
4e4bef9
Merge branch 'develop' into fix/rate-crashes
Syn-McJ May 28, 2024
49358e3
Merge pull request #654 from Syn-McJ/fix/rate-crashes
Syn-McJ May 28, 2024
b9200e3
Merge pull request #653 from Syn-McJ/fix/crowdnode-crash
Syn-McJ May 28, 2024
0b21378
feat: translations
Syn-McJ Jun 12, 2024
ca61265
chore: bump version
Syn-McJ Jun 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ TODO.md
*/GoogleService-Info.plist
*/Topper-Info.plist
*/Coinbase-Info.plist
*/ZenLedger-Info.plist
7 changes: 3 additions & 4 deletions DashPay/Presentation/Home/Cells/DWFilterHeaderView.xib
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -30,7 +29,7 @@
<color key="textColor" name="DarkTitleColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" verticalCompressionResistancePriority="1000" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4tg-cy-qVc" customClass="DashButton" customModule="dashwallet" customModuleProvider="target">
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" verticalCompressionResistancePriority="1000" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4tg-cy-qVc" customClass="DWDashButton" customModule="dashwallet" customModuleProvider="target">
<rect key="frame" x="319" y="8" width="12" height="53"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleCaption2"/>
<color key="tintColor" name="DashBlueColor"/>
Expand Down
196 changes: 196 additions & 0 deletions DashPay/Presentation/Home/Views/DPVotingResultView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
//
// Created by Andrei Ashikhmin
// Copyright © 2023 Dash Core Group. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

import Foundation

enum DPVotingState {
case approved
case notApproved
}

@objc
class DPVotingResultView: UIView {
var state: DPVotingState = .approved {
didSet {
change(state: self.state)
}
}

var onAction: (() -> ())?
var onClose: (() -> ())?

private let closeButton: UIButton = {
let button = UIButton(type: .system)
let symbolConfiguration = UIImage.SymbolConfiguration(scale: .small)
let symbolImage = UIImage(systemName: "xmark", withConfiguration: symbolConfiguration)
button.setImage(symbolImage, for: .normal)
button.tintColor = .dw_tabbarInactiveButton()
button.translatesAutoresizingMaskIntoConstraints = false

return button
}()

private let actionButton: UIButton = {
let button = ActionButton()
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.dw_mediumFont(ofSize: 13)
]
button.setAttributedTitle(NSAttributedString(string: NSLocalizedString("Create Username", comment: ""), attributes: attributes), for: .normal)
button.translatesAutoresizingMaskIntoConstraints = false
button.isHidden = true

return button
}()

private let image: UIImageView = {
let image = UIImageView(image: UIImage(named: "pay_user_accessory"))
image.translatesAutoresizingMaskIntoConstraints = false

return image
}()

private let contentView: UIView = {
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
view.backgroundColor = .dw_background()
view.layer.cornerRadius = 8.0
view.layer.masksToBounds = true

return view
}()

private let titleLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.textColor = .dw_label()
label.numberOfLines = 0
label.font = .dw_mediumFont(ofSize: 13)
label.text = NSLocalizedString("Join DashPay", comment: "")

return label
}()

private let subtitleLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.textColor = .dw_secondaryText()
label.numberOfLines = 0
label.font = .dw_regularFont(ofSize: 12)
label.text = NSLocalizedString("Create a username, add your friends.", comment: "")

return label
}()

private var actionButtonHeightConstraint: NSLayoutConstraint!
private var actionButtonMarginConstraint: NSLayoutConstraint!

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

override init(frame: CGRect) {
super.init(frame: frame)

backgroundColor = UIColor.clear
layoutMargins = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16)

let shadowView = ShadowView(frame: .zero)
shadowView.translatesAutoresizingMaskIntoConstraints = false
shadowView.insetsLayoutMarginsFromSafeArea = true
addSubview(shadowView)

shadowView.addSubview(contentView)
contentView.addSubview(titleLabel)
contentView.addSubview(subtitleLabel)
contentView.addSubview(image)
contentView.addSubview(closeButton)
closeButton.addAction(.touchUpInside) { [weak self] _ in
self?.onClose?()
}
contentView.addSubview(actionButton)
actionButton.addAction(.touchUpInside) { [weak self] _ in
self?.onAction?()
}

titleLabel.setContentCompressionResistancePriority(.required - 1, for: .horizontal)
subtitleLabel.setContentCompressionResistancePriority(.required - 2, for: .horizontal)
titleLabel.setContentCompressionResistancePriority(.required - 1, for: .vertical)
subtitleLabel.setContentCompressionResistancePriority(.required - 2, for: .vertical)

actionButtonHeightConstraint = actionButton.heightAnchor.constraint(equalToConstant: 30)
actionButtonMarginConstraint = contentView.bottomAnchor.constraint(equalTo: actionButton.bottomAnchor, constant: 15)

NSLayoutConstraint.activate([
shadowView.leadingAnchor.constraint(equalTo: layoutMarginsGuide.leadingAnchor),
shadowView.topAnchor.constraint(equalTo: topAnchor),
layoutMarginsGuide.trailingAnchor.constraint(equalTo: shadowView.trailingAnchor),
bottomAnchor.constraint(equalTo: shadowView.bottomAnchor),

contentView.leadingAnchor.constraint(equalTo: shadowView.leadingAnchor),
contentView.topAnchor.constraint(equalTo: shadowView.topAnchor),
contentView.trailingAnchor.constraint(equalTo: closeButton.trailingAnchor),

shadowView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
shadowView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),

titleLabel.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 16),
titleLabel.leadingAnchor.constraint(equalTo: image.trailingAnchor, constant: 15),
titleLabel.trailingAnchor.constraint(equalTo: closeButton.leadingAnchor),

subtitleLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 4.0),
subtitleLabel.leadingAnchor.constraint(equalTo: image.trailingAnchor, constant: 15),
subtitleLabel.trailingAnchor.constraint(equalTo: closeButton.leadingAnchor),

image.widthAnchor.constraint(equalToConstant: 32.0),
image.heightAnchor.constraint(equalToConstant: 32.0),
image.topAnchor.constraint(equalTo: titleLabel.topAnchor),
image.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 15),

closeButton.heightAnchor.constraint(equalToConstant: 40),
closeButton.widthAnchor.constraint(equalToConstant: 40),
closeButton.topAnchor.constraint(equalTo: topAnchor),
closeButton.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -15),

actionButtonHeightConstraint,
actionButton.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 15),
actionButton.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -15),
actionButton.topAnchor.constraint(equalTo: subtitleLabel.bottomAnchor, constant: 15),
actionButtonMarginConstraint
])

change(state: self.state)
}

private func change(state: DPVotingState) {
actionButton.isHidden = state != .notApproved


if state == .notApproved {
image.image = UIImage(named: "dashpay.welcome.disabled")
titleLabel.text = NSLocalizedString("Requested username was not approved", comment: "")
subtitleLabel.text = NSLocalizedString("You can create a different username without paying again", comment: "")
actionButtonHeightConstraint.constant = 30
actionButtonMarginConstraint.constant = 15
} else {
image.image = UIImage(named: "dashpay.welcome")
titleLabel.text = NSLocalizedString("Your username was approved", comment: "")
subtitleLabel.text = NSLocalizedString("Update your profile and start adding contacts", comment: "")
actionButtonHeightConstraint.constant = 0
actionButtonMarginConstraint.constant = 0
}
}
}
105 changes: 105 additions & 0 deletions DashPay/Presentation/Home/Views/DPWelcomeView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
//
// Created by Andrew Podkovyrin
// Copyright © 2020 Dash Core Group. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

import UIKit

@objc
class DPWelcomeView: DWBasePressableControl {
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

override init(frame: CGRect) {
let titleLabel = UILabel()
let subtitleLabel = UILabel()
let arrowImageView = UIImageView(image: UIImage(named: "pay_user_accessory"))

super.init(frame: frame)

backgroundColor = UIColor.clear
layoutMargins = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16)

let shadowView = ShadowView(frame: .zero)
shadowView.translatesAutoresizingMaskIntoConstraints = false
shadowView.insetsLayoutMarginsFromSafeArea = true
shadowView.isUserInteractionEnabled = false
addSubview(shadowView)

let contentView = UIView()
contentView.translatesAutoresizingMaskIntoConstraints = false
contentView.backgroundColor = .dw_background()
contentView.layer.cornerRadius = 8.0
contentView.layer.masksToBounds = true
contentView.isUserInteractionEnabled = false
shadowView.addSubview(contentView)

titleLabel.translatesAutoresizingMaskIntoConstraints = false
titleLabel.textColor = UIColor.dw_darkTitle()
titleLabel.numberOfLines = 0
titleLabel.adjustsFontForContentSizeCategory = true
titleLabel.font = .dw_font(forTextStyle: .subheadline)
titleLabel.text = NSLocalizedString("Join DashPay", comment: "")
titleLabel.isUserInteractionEnabled = false
contentView.addSubview(titleLabel)

subtitleLabel.translatesAutoresizingMaskIntoConstraints = false
subtitleLabel.textColor = .dw_tertiaryText()
subtitleLabel.numberOfLines = 0
subtitleLabel.adjustsFontForContentSizeCategory = true
subtitleLabel.font = .dw_font(forTextStyle: .footnote)
subtitleLabel.text = NSLocalizedString("Create a username, add your friends.", comment: "")
subtitleLabel.isUserInteractionEnabled = false
contentView.addSubview(subtitleLabel)

arrowImageView.translatesAutoresizingMaskIntoConstraints = false
arrowImageView.isUserInteractionEnabled = false
contentView.addSubview(arrowImageView)

titleLabel.setContentCompressionResistancePriority(.required - 1, for: .horizontal)
subtitleLabel.setContentCompressionResistancePriority(.required - 2, for: .horizontal)
titleLabel.setContentCompressionResistancePriority(.required - 1, for: .vertical)
subtitleLabel.setContentCompressionResistancePriority(.required - 2, for: .vertical)

let guide = layoutMarginsGuide
NSLayoutConstraint.activate([
shadowView.leadingAnchor.constraint(equalTo: guide.leadingAnchor),
shadowView.topAnchor.constraint(equalTo: topAnchor),
guide.trailingAnchor.constraint(equalTo: shadowView.trailingAnchor),
bottomAnchor.constraint(equalTo: shadowView.bottomAnchor),

contentView.leadingAnchor.constraint(equalTo: shadowView.leadingAnchor),
contentView.topAnchor.constraint(equalTo: shadowView.topAnchor),
shadowView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
shadowView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),

titleLabel.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 16),
titleLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 12),

subtitleLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 2.0),
subtitleLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 12),
contentView.bottomAnchor.constraint(equalTo: subtitleLabel.bottomAnchor, constant: 16),

arrowImageView.leadingAnchor.constraint(equalTo: subtitleLabel.trailingAnchor, constant: 12),
arrowImageView.leadingAnchor.constraint(equalTo: titleLabel.trailingAnchor, constant: 12),
arrowImageView.centerYAnchor.constraint(equalTo: contentView.centerYAnchor),
contentView.trailingAnchor.constraint(equalTo: arrowImageView.trailingAnchor, constant: 12),

arrowImageView.widthAnchor.constraint(equalToConstant: 32.0),
arrowImageView.heightAnchor.constraint(equalToConstant: 32.0),
])
}
}
Loading
Loading