Skip to content

Commit 68a4ac2

Browse files
committed
chore: some dashpay adjustments
1 parent d5ad42d commit 68a4ac2

7 files changed

Lines changed: 24 additions & 13 deletions

File tree

DashSyncCurrentCommit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f8061dcfb95a4d43ff567dff9ec9db7f9e8c51f7
1+
6c7a5d3ea25c845e58f7965e4614532bff52f09f

DashWallet/Sources/Application/Syncyng Activity Monitor/SyncingActivityMonitor.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class SyncingActivityMonitor: NSObject, NetworkReachabilityHandling {
153153

154154
@objc
155155
func peerManagerConnectedPeersDidChangeNotification(notification: Notification) {
156-
if model.peerManagerConnected {
156+
if model.peersSyncInfo.peerManagerConnected {
157157
removeChainObserver(.peerManagerConnectedPeersDidChange)
158158
startSyncingIfNeeded()
159159
}
@@ -172,7 +172,7 @@ class SyncingActivityMonitor: NSObject, NetworkReachabilityHandling {
172172
extension SyncingActivityMonitor {
173173

174174
private func startSyncingIfNeeded() {
175-
guard model.peerManagerConnected else {
175+
guard model.peersSyncInfo.peerManagerConnected else {
176176
addChainObserver(.peerManagerConnectedPeersDidChange, #selector(peerManagerConnectedPeersDidChangeNotification(notification:)))
177177
return
178178
}
@@ -183,7 +183,7 @@ extension SyncingActivityMonitor {
183183
private func startSyncingActivity() {
184184
guard !isSyncing else { return }
185185

186-
progress = model.combinedSyncProgress
186+
progress = model.progress
187187
lastPeakDate = nil
188188

189189
NSObject.cancelPreviousPerformRequests(withTarget: self, selector: #selector(syncLoop), object: nil)
@@ -211,7 +211,7 @@ extension SyncingActivityMonitor {
211211
}
212212

213213
private func updateProgress() {
214-
let progress = model.combinedSyncProgress
214+
let progress = model.progress
215215
if progress < kSyncingCompleteProgress {
216216
isSyncing = true
217217

@@ -277,7 +277,7 @@ extension SyncingActivityMonitor {
277277

278278
extension SyncingActivityMonitor {
279279
private var chainSyncProgress: Double {
280-
model.combinedSyncProgress
280+
model.progress
281281
}
282282

283283
private var shouldStopSyncing: Bool {

DashWallet/Sources/UI/Home/Models/DWDashPayModel.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ - (void)updateRegistrationStatusForIdentity:(DSIdentity *)identity
446446
if (isDone) {
447447
[DWGlobalOptions sharedInstance].dashpayRegistrationCompleted = YES;
448448
[DWGlobalOptions sharedInstance].dashpayUsername = nil;
449-
NSAssert(self.username != nil, @"Default DSIdentity has an empty username");
449+
// NSAssert(self.username != nil, @"Default DSIdentity has an empty username");
450450

451451
[self.userProfile update];
452452
}

DashWallet/Sources/UI/Home/Syncing Views/Alert/SyncingAlertContentView.swift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,19 @@ final class SyncingAlertContentView: UIView {
119119
model.lastTerminalBlockHeight,
120120
model.estimatedBlockHeight)
121121
} else if kind == .masternodes {
122-
let masternodeListsReceived = model.masternodeListSyncInfo.retrievalQueueCount
123-
let masternodeListsTotal = model.masternodeListSyncInfo.retrievalQueueMaxAmount
122+
let masternodeListsReceived = model.masternodeListSyncInfo.queueCount
123+
let masternodeListsTotal = model.masternodeListSyncInfo.queueMaxAmount
124124
subtitleLabel.text = localized(
125125
template: "masternode list #%d of %d",
126126
masternodeListsReceived > masternodeListsTotal ? 0 : masternodeListsTotal - masternodeListsTotal,
127127
masternodeListsTotal)
128+
} else if kind == .platform {
129+
let identitiesKeysCount = model.platformSyncInfo.queueCount
130+
let identitiesKeysTotal = model.platformSyncInfo.queueMaxAmount
131+
subtitleLabel.text = localized(
132+
template: "platform #%d of %d",
133+
identitiesKeysCount > identitiesKeysTotal ? 0 : identitiesKeysTotal - identitiesKeysCount,
134+
identitiesKeysTotal)
128135
} else {
129136
subtitleLabel.text = localized(
130137
template: "block #%d of %d",
@@ -193,7 +200,7 @@ final class SyncingAlertContentView: UIView {
193200
let model = notification.userInfo?[kChainManagerNotificationSyncStateKey] as? DSSyncState else {
194201
return
195202
}
196-
self.update(with: model.combinedSyncProgress)
203+
self.update(with: model.progress)
197204
}
198205

199206
}

DashWallet/Sources/UI/Home/Syncing Views/Sync View/SyncView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ final class SyncView: UIView {
9999
model.lastTerminalBlockHeight,
100100
model.estimatedBlockHeight)
101101
} else if kind == .masternodes {
102-
let masternodeListsReceived = model.masternodeListSyncInfo.retrievalQueueCount
103-
let masternodeListsTotal = model.masternodeListSyncInfo.retrievalQueueMaxAmount
102+
let masternodeListsReceived = model.masternodeListSyncInfo.queueCount
103+
let masternodeListsTotal = model.masternodeListSyncInfo.queueMaxAmount
104104
descriptionLabel.text = String(format: NSLocalizedString("masternode list #%d of %d", comment: ""),
105105
masternodeListsReceived > masternodeListsTotal ? 0 : masternodeListsTotal - masternodeListsTotal,
106106
masternodeListsTotal)

DashWallet/Sources/UI/Onboarding/Stubs/DWReceiveModelStub.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ - (void)updateReceivingInfo {
7171
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
7272
NSString *paymentAddress = @"XrUv3aniSvZEKx2VoFe5fTqFfYL5JYFkbg";
7373

74-
DSChain *chain = nil;
74+
DSChain *chain = DSChain.testnet;
7575
DSPaymentRequest *paymentRequest = [DSPaymentRequest requestWithString:paymentAddress onChain:chain];
7676

7777
const uint64_t amount = self.amount;

Podfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ post_install do |installer|
7171
# fixes warnings about unsupported Deployment Target in Xcode
7272
target.build_configurations.each do |config|
7373
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
74+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
75+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'DASHCORE_QUORUM_VALIDATION=1'
76+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'DPP_STATE_TRANSITIONS=1'
77+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'PLATFORM_VALUE_STD=1'
7478
end
7579
end
7680
# update info about current DashSync version

0 commit comments

Comments
 (0)