Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ TODO.md

# Transifex CLI binary
tx
.claude/settings.local.json
docs/
5 changes: 5 additions & 0 deletions DashWallet/Sources/Models/Explore Dash/ExploreDash.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ public class ExploreDash {
databaseConnection = ExploreDatabaseConnection()
try databaseConnection.connect()

// Firebase Storage sync disabled — placeholder GoogleService-Info.plist
// points at a different bucket than the hardcoded gs://dash-wallet-firebase URL.
// The bundled explore.db is used instead.
databaseSyncManager = ExploreDatabaseSyncManager.share
databaseSyncManager.start()

Expand Down Expand Up @@ -160,6 +163,7 @@ public class ExploreDash {

try FileManager.default.copyItem(at: dbURL, to: destinationPath)

// Firebase Storage sync disabled — see configure() for context.
ExploreDatabaseSyncManager.share.exploreDatabaseLastVersion = bundleExploreDatabaseSyncTime
ExploreDatabaseSyncManager.share.exploreDatabaseLastSyncTimestamp = bundleExploreDatabaseSyncTime
}
Expand All @@ -176,6 +180,7 @@ public class ExploreDash {
}

/// Remove if bundled version is newer than last downloaded
// Firebase Storage sync disabled — see configure() for context.
if ExploreDatabaseSyncManager.share.exploreDatabaseLastVersion < bundleExploreDatabaseSyncTime {
try? FileManager.default.removeItem(at: destinationPath)
}
Expand Down
3 changes: 2 additions & 1 deletion DashWallet/Sources/UI/Main/MainTabbarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
//

import UIKit
import SwiftUI
import Combine

// MARK: - MainTabbarTabs
Expand Down Expand Up @@ -201,7 +202,7 @@ extension MainTabbarController {
item = UITabBarItem(title: nil, image: MainTabbarTabs.explore.icon, selectedImage: MainTabbarTabs.explore.selectedIcon)
item.imageInsets = UIEdgeInsets(top: 6, left: 0, bottom: -6, right: 0)

nvc = BaseNavigationController()
nvc = BaseNavigationController(nibName: nil, bundle: nil)
let exploreScreen = ExploreMenuScreen(
vc: nvc,
showBackButton: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ final class ProvideAmountViewController: SendAmountViewController {

let compactAppearance = standardAppearance.copy()

let navigationBar = navigationController!.navigationBar
// viewWillAppear can fire after this VC has been popped (e.g. when a modal
// presented from it is dismissed), at which point navigationController is nil.
guard let navigationBar = navigationController?.navigationBar else { return }
navigationBar.isTranslucent = true
navigationBar.standardAppearance = standardAppearance
navigationBar.scrollEdgeAppearance = standardAppearance
Expand Down
21 changes: 21 additions & 0 deletions DashWallet/Sources/UI/Payment Controller/PaymentController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// limitations under the License.
//

import SafariServices
import UIKit

typealias PaymentControllerPresentationAnchor = UIViewController
Expand Down Expand Up @@ -243,6 +244,26 @@ extension PaymentController: DWPaymentProcessorDelegate {
func paymentProcessor(_ processor: DWPaymentProcessor, showProgressHUDWithMessage message: String?) {
presentationAnchor?.topController().view.dw_showProgressHUD(withMessage: message)
}

func paymentProcessor(_ processor: DWPaymentProcessor, openInAppBrowserWith url: URL) {
// Defer so the confirm-screen dismiss + nav pop animations finish first.
DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) { [weak self] in
// Use the external presentation context (e.g. the screen the user came from)
// rather than `presentationAnchor`, whose first branch is the now-popped
// ProvideAmountViewController.
guard let self = self,
let stableAnchor = self.presentationContextProvider?.presentationAnchorForPaymentController(self),
stableAnchor.view.window != nil else { return }
let presenter = stableAnchor.topController()
// Mirror the TxDetailViewController flow: dw_controller factory for tint,
// .overFullScreen so the underlying view stays in the hierarchy on dismiss
// (otherwise revealing a detached VC crashes inside its viewWillAppear).
let safari = SFSafariViewController.dw_controller(with: url)
safari.modalPresentationStyle = .overFullScreen
safari.modalPresentationCapturesStatusBarAppearance = true
presenter.present(safari, animated: true)
}
}
}

// MARK: ProvideAmountViewControllerDelegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ NS_ASSUME_NONNULL_BEGIN
didSweepRequest:(DSPaymentRequest *)protocolRequest
transaction:(DSTransaction *)transaction;

// Fires after a successful payment when the BIP21 URI carried `callback=<https-url>`.
@optional
- (void)paymentProcessor:(DWPaymentProcessor *)processor openInAppBrowserWithURL:(NSURL *)url;
@required

// Handle File

- (void)paymentProcessor:(DWPaymentProcessor *)processor displayFileProcessResult:(NSString *)result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,12 @@ - (void)handleCallbackSchemeIfNeeded:(DSPaymentProtocolRequest *)protocolRequest
completionHandler:nil];
}
}

// BIP21 `callback=<https-url>` — already https-validated at parse time.
NSURL *inAppCallback = self.paymentInput.request.callback;
if (inAppCallback && [self.delegate respondsToSelector:@selector(paymentProcessor:openInAppBrowserWithURL:)]) {
[self.delegate paymentProcessor:self openInAppBrowserWithURL:inAppCallback];
}
}

- (void)cancelPayment {
Expand Down
8 changes: 7 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
source 'https://rubygems.org'

gem 'rexml'
gem 'cocoapods', '>=1.11.2'
gem 'ostruct'
gem 'logger'
gem 'benchmark'
gem 'bigdecimal'
gem 'cocoapods', '1.15.2'
gem 'xcodeproj', github: 'CocoaPods/Xcodeproj'
gem 'activesupport', '7.0.4.3'
gem 'xcpretty'
# ethon is manually updated to avoid segmentation fault crashes on the M1. See https://github.com/CocoaPods/CocoaPods/issues/10446
gem 'ethon', '>=0.13.0'
80 changes: 51 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: c12d2ae619ae42f947a6b07d865f69948c752df5
specs:
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)

GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
rexml
CFPropertyList (3.0.8)
activesupport (7.0.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
benchmark (0.5.0)
bigdecimal (4.1.2)
claide (1.1.0)
cocoapods (1.12.1)
cocoapods (1.15.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.12.1)
cocoapods-core (= 1.15.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
Expand All @@ -32,8 +45,8 @@ GEM
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.12.1)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.15.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -44,7 +57,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
Expand All @@ -53,48 +66,57 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.2)
concurrent-ruby (1.3.6)
drb (2.2.3)
escape (0.0.4)
ethon (0.16.0)
ethon (0.18.0)
ffi (>= 1.15.0)
ffi (1.15.5)
logger
ffi (1.17.4-arm64-darwin)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.13.0)
httpclient (2.9.0)
mutex_m
i18n (1.14.8)
concurrent-ruby (~> 1.0)
json (2.6.3)
minitest (5.18.0)
json (2.19.5)
logger (1.7.0)
minitest (6.0.6)
drb (~> 2.0)
prism (~> 1.5)
molinillo (0.8.0)
nanaimo (0.3.0)
mutex_m (0.3.0)
nanaimo (0.4.0)
nap (1.1.0)
netrc (0.11.0)
ostruct (0.6.3)
prism (1.9.0)
public_suffix (4.0.7)
rexml (3.2.5)
rexml (3.4.4)
rouge (2.0.7)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
typhoeus (1.6.0)
ethon (>= 0.18.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)

PLATFORMS
arm64-darwin-22
arm64-darwin-25

DEPENDENCIES
cocoapods (>= 1.11.2)
activesupport (= 7.0.4.3)
benchmark
bigdecimal
cocoapods (= 1.15.2)
ethon (>= 0.13.0)
logger
ostruct
rexml
xcodeproj!
xcpretty

BUNDLED WITH
Expand Down
Loading