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

chore: Release 8.2.0 #663

Merged
merged 34 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5d074c6
feat: crowdnode grouped tx draft
Syn-McJ May 26, 2024
51e5c44
feat: home view draft
Syn-McJ May 26, 2024
9b0a1f1
Merge branch 'fix/rate-crashes' into feat/tx-grouping
Syn-McJ May 27, 2024
f7de6f9
feat: grouping + overscroll
Syn-McJ May 28, 2024
515da12
Merge branch 'develop' into feat/tx-grouping
Syn-McJ May 29, 2024
faddd54
feat: home screen UI
Syn-McJ May 30, 2024
3e8f62b
feat: CrowdNode tx details UI
Syn-McJ Jun 1, 2024
4dfda04
fix: performace improvements
Syn-McJ Jun 1, 2024
54f3661
chore: cleanup
Syn-McJ Jun 1, 2024
6acec84
fix: performance fixes
Syn-McJ Jun 2, 2024
b2d1b24
Merge pull request #655 from Syn-McJ/feat/tx-grouping
Syn-McJ Jun 4, 2024
5cb36b2
fix: provide overriden fiat value from txinfo db table
Syn-McJ Jun 5, 2024
cab49b8
fix: button stretch in the Toast
Syn-McJ Jun 5, 2024
3d22208
fix: direction performance
Syn-McJ Jun 5, 2024
d26fc26
fix: tax export
Syn-McJ Jun 5, 2024
b719906
Merge pull request #656 from Syn-McJ/fix/historical-rates
Syn-McJ Jun 7, 2024
e170daa
chore: refactor DWBackupSeedPhraseViewController to Swift
Syn-McJ Jul 3, 2024
8190c93
fix: request pin code if not authenticated
Syn-McJ Jul 3, 2024
d2e2395
chore: bump version
Syn-McJ Jul 4, 2024
22ce583
chore: bump up 8.2.0
pankcuf Jul 6, 2024
770f51e
Merge branch 'develop' into fix/seed-phrase-screen
Syn-McJ Jul 8, 2024
8e21ec1
fix: check if tx is a stub before getting the state
Syn-McJ Jul 8, 2024
929122c
Merge pull request #658 from Syn-McJ/fix/seed-phrase-screen
pankcuf Jul 10, 2024
10d57d8
Merge branch 'develop' into fix/onboarding-tx-preview
pankcuf Jul 10, 2024
34bd732
Merge pull request #659 from Syn-McJ/fix/onboarding-tx-preview
pankcuf Jul 10, 2024
0fb4748
feat: rework progress indication flow
pankcuf Jul 11, 2024
ab76c74
chore: merged
pankcuf Jul 11, 2024
180f94c
chore: dashsync commit
pankcuf Jul 11, 2024
0a12f21
chore: minor api changes
pankcuf Jul 11, 2024
dc8ba2c
fix: account can be nil when switching networks for example
pankcuf Jul 13, 2024
d409fbf
fix: geometry recalculation is non-efficient and lead to infinite re-…
pankcuf Jul 13, 2024
ab422fd
fix: dark mode colors & no network header height
Syn-McJ Jul 17, 2024
9a93a73
Merge pull request #661 from Syn-McJ/fix/home-ui
Syn-McJ Jul 18, 2024
943b515
Merge pull request #660 from dashpay/feat/core-v0.21-support
pankcuf Jul 30, 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
2 changes: 1 addition & 1 deletion DashSyncCurrentCommit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
49b6db28808308255a8a6a30d1fe5670d9c9c50e
751595434308e0761cceb15b428a41ca5eefdb8b
224 changes: 106 additions & 118 deletions DashWallet.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "Group 1805.png",
"filename" : "cn-tx.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 1805@2x.png",
"filename" : "cn-tx@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 1805@3x.png",
"filename" : "cn-tx@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "transaction.prev.receive.png",
"filename" : "Transaction types - Primary.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "transaction.prev.receive@2x.png",
"filename" : "Transaction types - Primary@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "transaction.prev.receive@3x.png",
"filename" : "Transaction types - Primary@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Transaction types - Primary.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Transaction types - [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Transaction types - [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Transaction types - Primary.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Transaction types - [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Transaction types - [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import Foundation

private let kChainManagerNotificationChainKey = "DSChainManagerNotificationChainKey"
private let kChainManagerNotificationSyncStateKey = "DSChainManagerNotificationSyncStateKey"

private let kSyncingCompleteProgress = 1.0
private let kMaxProgressDelta = 0.1 // 10%
Expand Down Expand Up @@ -53,6 +54,7 @@ class SyncingActivityMonitor: NSObject, NetworkReachabilityHandling {
case noConnection
case unknown
}
public lazy var model: DSSyncState = DSSyncState(syncPhase: .offline)

@objc
public var progress: Double = 0 {
Expand Down Expand Up @@ -122,14 +124,6 @@ class SyncingActivityMonitor: NSObject, NetworkReachabilityHandling {
@objc
func chainManagerSyncStartedNotification(notification: Notification) {
guard shouldAcceptSyncNotification(notification) else { return }

startSyncingActivity()
}

@objc
func chainManagerParametersUpdatedNotification(notification: Notification) {
guard shouldAcceptSyncNotification(notification) else { return }

startSyncingActivity()
}

Expand All @@ -147,20 +141,20 @@ class SyncingActivityMonitor: NSObject, NetworkReachabilityHandling {

stopSyncingActivity(failed: true)
}

@objc
func chainManagerChainBlocksDidChangeNotification(notification: Notification) {
guard !isSyncing, chainSyncProgress < kSyncingCompleteProgress else { return }

startSyncingActivity()
func chainManagerSyncStateChangedNotification(notification: Notification) {
guard shouldAcceptSyncNotification(notification) else { return }

if let model = notification.userInfo?[kChainManagerNotificationSyncStateKey] as? DSSyncState {
self.model = model
}
}

@objc
func peerManagerConnectedPeersDidChangeNotification(notification: Notification) {
let isConnected = DWEnvironment.sharedInstance().currentChainManager.peerManager.connected

if isConnected {
NotificationCenter.default.removeObserver(self, name: .peerManagerConnectedPeersDidChange, object: nil)
if model.peerManagerConnected {
removeChainObserver(.peerManagerConnectedPeersDidChange)
startSyncingIfNeeded()
}
}
Expand All @@ -173,14 +167,13 @@ class SyncingActivityMonitor: NSObject, NetworkReachabilityHandling {
@objc public static let shared = SyncingActivityMonitor()
}

// MARK: Suncing
// MARK: Syncing

extension SyncingActivityMonitor {

private func startSyncingIfNeeded() {
guard DWEnvironment.sharedInstance().currentChainManager.peerManager.connected else {
NotificationCenter.default.addObserver(self, selector: #selector(peerManagerConnectedPeersDidChangeNotification(notification:)),
name: .peerManagerConnectedPeersDidChange, object: nil)

guard model.peerManagerConnected else {
addChainObserver(.peerManagerConnectedPeersDidChange, #selector(peerManagerConnectedPeersDidChangeNotification(notification:)))
return
}

Expand All @@ -190,7 +183,7 @@ extension SyncingActivityMonitor {
private func startSyncingActivity() {
guard !isSyncing else { return }

progress = chainSyncProgress
progress = model.combinedSyncProgress
lastPeakDate = nil

NSObject.cancelPreviousPerformRequests(withTarget: self, selector: #selector(syncLoop), object: nil)
Expand All @@ -205,16 +198,18 @@ extension SyncingActivityMonitor {
isSyncing = false
state = failed ? .syncFailed : .syncDone
}

@objc
private func syncLoop() {
guard reachability.networkReachabilityStatus != .notReachable else {
state = .noConnection
return
}
updateProgress()
}

let progress = chainSyncProgress

private func updateProgress() {
let progress = model.combinedSyncProgress
if progress < kSyncingCompleteProgress {
isSyncing = true

Expand Down Expand Up @@ -261,26 +256,26 @@ extension SyncingActivityMonitor {
syncLoop()
}

private func addChainObserver(_ aName: NSNotification.Name?, _ aSelector: Selector) {
NotificationCenter.default.addObserver(self, selector: aSelector, name: aName, object: nil)
}
private func removeChainObserver(_ aName: NSNotification.Name?) {
NotificationCenter.default.removeObserver(self, name: aName, object: nil)
}

private func configureObserver() {
let notificationCenter = NotificationCenter.default
notificationCenter.addObserver(self, selector: #selector(chainManagerSyncStartedNotification(notification:)),
name: .chainManagerSyncStarted, object: nil)
notificationCenter.addObserver(self, selector: #selector(chainManagerParametersUpdatedNotification(notification:)),
name: .chainManagerParametersUpdated, object: nil)
notificationCenter.addObserver(self, selector: #selector(chainManagerSyncFinishedNotification(notification:)),
name: .chainManagerSyncFinished, object: nil)
notificationCenter.addObserver(self, selector: #selector(chainManagerSyncFailedNotification(notification:)),
name: .chainManagerSyncFailed, object: nil)
notificationCenter.addObserver(self, selector: #selector(chainManagerChainBlocksDidChangeNotification(notification:)),
name: .chainManagerChainSyncBlocksDidChange, object: nil)
addChainObserver(.chainManagerSyncStarted, #selector(chainManagerSyncStartedNotification(notification:)))
addChainObserver(.chainManagerSyncFinished, #selector(chainManagerSyncFinishedNotification(notification:)))
addChainObserver(.chainManagerSyncFailed, #selector(chainManagerSyncFailedNotification(notification:)))
addChainObserver(.chainManagerSyncStateChanged, #selector(chainManagerSyncStateChangedNotification(notification:)))
}
}

// MARK: Utils

extension SyncingActivityMonitor {
private var chainSyncProgress: Double {
DWEnvironment.sharedInstance().currentChainManager.combinedSyncProgress
model.combinedSyncProgress
}

private var shouldStopSyncing: Bool {
Expand All @@ -305,16 +300,12 @@ extension SyncingActivityMonitor {
}

extension Notification.Name {
// TODO: unused?
static let syncStateChangedNotification: Notification.Name = .init(rawValue: "DWSyncStateChangedNotification")

static let chainManagerSyncStarted: Notification.Name = .init(rawValue: "DSChainManagerSyncWillStartNotification")
static let chainManagerParametersUpdated: Notification
.Name = .init(rawValue: "DSChainManagerSyncParametersUpdatedNotification")
static let chainManagerSyncFinished: Notification.Name = .init(rawValue: "DSChainManagerSyncFinishedNotification")
static let chainManagerSyncFailed: Notification.Name = .init(rawValue: "DSChainManagerSyncFailedNotification")
static let chainManagerChainSyncBlocksDidChange: Notification
.Name = .init(rawValue: "DSChainChainSyncBlocksDidChangeNotification")
static let peerManagerConnectedPeersDidChange: Notification
.Name = .init(rawValue: "DSPeerManagerConnectedPeersDidChangeNotification")

static let peerManagerConnectedPeersDidChange: Notification.Name = .init(rawValue: "DSPeerManagerConnectedPeersDidChangeNotification")
static let chainManagerSyncStateChanged: Notification.Name = .init(rawValue: "DSChainManagerSyncStateDidChangeNotification")
}
Loading