Skip to content
Open
Show file tree
Hide file tree
Changes from 14 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
62 changes: 62 additions & 0 deletions .github/workflows/release-xcode26.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release Archive (Xcode 26.x)

on:
workflow_dispatch:
push:
branches:
- release/*
- release/**

jobs:
archive:
name: Archive Build
runs-on: macos-latest
timeout-minutes: 90

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Select Xcode 26.x
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "26.x"
Comment on lines +22 to +25
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

maxim-lobanov/setup-xcode action xcode-version input accepted formats

💡 Result:

The xcode-version input for the maxim-lobanov/setup-xcode GitHub Action accepts the following formats: - latest (latest Xcode version including betas available on the runner) - latest-stable (latest stable Xcode version) - SemVer strings, such as: - 16 - 16.4 - 26.3 - ^16.2.0 (SemVer range) - SemVer string followed by -beta (e.g., 16-beta) to select among beta releases Specific versions should be wrapped in single quotes in YAML (e.g., '16.4') to preserve trailing zeros, as GitHub Actions trims them from numbers. Available versions depend on the macOS runner image (e.g., macos-latest, macos-15, macos-26); check the GitHub runner-images repository for the full list pre-installed on each image. Examples: - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: latest-stable - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: '16.4'

Citations:


Replace xcode-version: "26.x" with a valid format — the "X.x" shorthand is not supported.

The setup-xcode action accepts SemVer strings (e.g., 26, 26.3) or SemVer ranges (e.g., ^26.0.0), but not the 26.x format. This will likely fail or silently fall back to the runner's default Xcode. Use xcode-version: "26" for any 26.x version, or specify an exact version like "26.3".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-xcode26.yml around lines 20 - 23, The workflow
uses the maxim-lobanov/setup-xcode action with an unsupported semver shorthand
value for the input key xcode-version; change the xcode-version value from
"26.x" to a valid SemVer string or range (e.g., "26" to allow any 26.x or a
specific patch like "26.3"), so update the xcode-version field in the Select
Xcode 26.x step to a supported format.


- name: Verify Xcode version
run: |
mkdir -p build
xcodebuild -version | tee build/xcode-version.txt
if ! grep -Eq '^Xcode 26\.' build/xcode-version.txt; then
echo "Expected Xcode 26.x but got:"
cat build/xcode-version.txt
exit 1
fi

- name: Setup CocoaPods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: "1.15.2"
Comment on lines +37 to +40
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

github action maxim-lobanov/setup-cocoapods

💡 Result:

The GitHub Action maxim-lobanov/setup-cocoapods sets up a specific version of CocoaPods in GitHub Actions workflows, primarily for macOS and Ubuntu runners. It supports specifying the version directly via the 'version' input (e.g., 'latest', '1.9.0') or dynamically parsing it from a Podfile.lock file using the 'podfile-path' input. Only one of these inputs should be used at a time. Key details: - Repository: https://github.com/maxim-lobanov/setup-cocoapods (31 stars, MIT license) - Latest release: v1.4.0 (November 27, 2023) - Last commit: November 27, 2023 (no updates since, as of 2026-04-20) - Available on GitHub Marketplace: https://github.com/marketplace/actions/setup-cocoapods Example usage: - name: Setup CocoaPods uses: maxim-lobanov/setup-cocoapods@v1 with: version: 1.9.0 or - name: Setup CocoaPods from Podfile.lock uses: maxim-lobanov/setup-cocoapods@v1 with: podfile-path: Example/Podfile.lock Status and considerations: - Open issues: 7 (e.g., caching requests, permission errors on Linux) - Security: StepSecurity rates it 2/10 due to 17 detected vulnerabilities in dependencies, no branch protection, no security policy. No published GitHub security advisories. - Maintenance: Inactive since late 2023 (0 commits in last 90 days per sources). - Alternative: step-security/setup-cocoapods (forked March 2026, actively maintained as a secure drop-in replacement, last push April 2026). Note: Not certified by GitHub; third-party action.

Citations:


🏁 Script executed:

#!/bin/bash
# Confirm the action is referenced consistently and check if resolvable via the GitHub API.
gh api repos/maxim-lobanov/setup-cocoapods 2>&1 | head -20

Repository: dashpay/dashwallet-ios

Length of output: 5922


Consider using the actively maintained step-security/setup-cocoapods action instead.

The maxim-lobanov/setup-cocoapods action exists and is available on the GitHub Marketplace, so the workflow will resolve correctly. However, the original repository has been inactive since November 2023 and contains 17 detected vulnerabilities in its dependencies (security rating 2/10). A maintained fork, step-security/setup-cocoapods, was published in March 2026 and is actively updated as of April 2026, providing a secure drop-in replacement.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-xcode26.yml around lines 35 - 38, The GitHub
Actions step named "Setup CocoaPods" currently uses
maxim-lobanov/setup-cocoapods@v1 which is unmaintained; replace the action
reference with the actively maintained fork step-security/setup-cocoapods@v1
(preserve the existing `version: "1.15.2"` input and any other with/inputs) so
the step reads the same but points to the maintained action; update any workflow
documentation/comments that mention the old action name to reflect the new
action.


- name: Ensure fastlane is available
run: |
if ! command -v fastlane >/dev/null 2>&1; then
gem install fastlane -N
fi
fastlane --version

- name: Install pods
run: pod install --repo-update

- name: Build release archive
run: fastlane ios release_archive_ci

- name: Upload build logs
if: always()
uses: actions/upload-artifact@v4
with:
name: release-xcode26-logs-${{ github.run_number }}
if-no-files-found: warn
path: |
build/xcode-version.txt
build/logs/**
fastlane/report.xml
95 changes: 82 additions & 13 deletions DashWallet.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Testflight"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = "en"
Expand Down
6 changes: 6 additions & 0 deletions DashWallet/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ - (void)registerForPushNotifications {
#pragma mark - UIApplicationDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions {
#if DEBUG
if ([NSProcessInfo.processInfo.environment[@"XCODE_RUNNING_FOR_PREVIEWS"] isEqualToString:@"1"]) {
return YES;
}
#endif /* DEBUG */

#if FRESH_INSTALL
[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:[[NSBundle mainBundle] bundleIdentifier]];
NSArray *secItemClasses = @[(__bridge id)kSecClassGenericPassword,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions DashWallet/Sources/UI/Buy Sell/BuySellPortal.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,6 @@
<constraint firstAttribute="bottom" secondItem="qd5-Z5-oBS" secondAttribute="bottom" id="pMR-5x-rbt"/>
</constraints>
</view>
<barButtonItem key="rightBarButtonItem" enabled="NO" id="jKH-G2-hOt">
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</barButtonItem>
</navigationItem>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<connections>
Expand Down
14 changes: 13 additions & 1 deletion DashWallet/Sources/UI/Home/HomeViewController+Shortcuts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ extension HomeViewController: DWLocalCurrencyViewControllerDelegate, ExploreView

private func showSendToContact() {
#if DASHPAY
let controller = DWContactsViewController()
let controller = DWContactsViewController(payModel: payModel, dataProvider: dataProvider)
controller.intent = .payToSelector
controller.payDelegate = self
let navigationController = BaseNavigationController(rootViewController: controller)
present(navigationController, animated: true, completion: nil)
Expand Down Expand Up @@ -311,3 +312,14 @@ extension HomeViewController: DWLocalCurrencyViewControllerDelegate, ExploreView
showGiftCardDetails(txId: txId)
}
}
#if DASHPAY
// MARK: DWContactsViewControllerPayDelegate
extension HomeViewController: DWContactsViewControllerPayDelegate {
func contactsViewController(_ controller: DWContactsViewController, payTo item: DWDPBasicUserItem) {
dismiss(animated: true) { [weak self] in
self?.performPay(toUser: item)
}
}
}
#endif

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix trailing newline lint warning.

SwiftLint reports the file ending does not satisfy the single trailing newline rule.

✂️ Minimal formatting fix
-#endif
-
+#endif

As per coding guidelines: **/*.swift: Use SwiftFormat and SwiftLint for Swift code formatting and linting as configured in .swiftformat and .swiftlint.yml files.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
`#endif`
🧰 Tools
🪛 SwiftLint (0.63.2)

[Warning] 325-325: Files should have a single trailing newline

(trailing_newline)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@DashWallet/Sources/UI/Home/HomeViewController`+Shortcuts.swift at line 325,
The file HomeViewController+Shortcuts.swift is missing a single trailing newline
at EOF which triggers SwiftLint; open the file
(HomeViewController+Shortcuts.swift) and ensure the file ends with exactly one
newline character (add a single trailing newline after the last line) so it
conforms to the single trailing newline rule used by SwiftLint/SwiftFormat.

Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ protocol ShortcutsViewDelegate: AnyObject {
// MARK: - ShortcutsView

class ShortcutsView: UIView {
private static let verticalPadding: CGFloat = 8.0

private var cancellableBag = Set<AnyCancellable>()
private let viewModel: HomeViewModel
private var lastLayoutWidth: CGFloat = 0
Expand Down Expand Up @@ -140,7 +142,7 @@ class ShortcutsView: UIView {
var cellSize = cellSize(for: contentSizeCategory, viewWidth: width)
cellSize.height = ceil(cellSize.height) // This fixes the autolayout issue when the size of the cell is higher than the collection view itself

collectionViewHeightConstraint.constant = cellSize.height
collectionViewHeightConstraint.constant = cellSize.height + ShortcutsView.verticalPadding * 2
setNeedsUpdateConstraints()

if let layout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout {
Expand Down Expand Up @@ -212,7 +214,7 @@ extension ShortcutsView: UICollectionViewDataSource, UICollectionViewDelegate, U
let cellCount = CGFloat(collectionView.numberOfItems(inSection: section))
var inset = (collectionView.bounds.size.width - (cellCount * cellWidth) - ((cellCount - 1) * cellSpacing)) * 0.5
inset = max(inset, 0.0)
return UIEdgeInsets(top: 0.0, left: inset, bottom: 0.0, right: inset)
return UIEdgeInsets(top: ShortcutsView.verticalPadding, left: inset, bottom: ShortcutsView.verticalPadding, right: inset)
}
}

Expand Down
92 changes: 40 additions & 52 deletions DashWallet/Sources/UI/Main/MainTabbarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ private enum MainTabbarTabs: Int, CaseIterable {
}

extension MainTabbarTabs {
var isEmpty: Bool {
self == .payment
}

var icon: UIImage {
let name: String

Expand All @@ -42,7 +38,7 @@ extension MainTabbarTabs {
case .contacts:
name = "tabbar_contacts_icon"
case .payment:
return UIImage()
name = "tabbar_pay_button"
case .explore:
name = "tabbar_discover_icon"
case .more:
Expand All @@ -51,7 +47,7 @@ extension MainTabbarTabs {

return UIImage(named: name)!.withRenderingMode(.alwaysOriginal)
}

var selectedIcon: UIImage {
let name: String

Expand All @@ -61,7 +57,7 @@ extension MainTabbarTabs {
case .contacts:
name = "tabbar_contacts_selected"
case .payment:
return UIImage()
name = "tabbar_pay_button"
case .explore:
name = "tabbar_discover_selected"
case .more:
Expand All @@ -84,7 +80,7 @@ class MainTabbarController: UITabBarController {

weak var homeController: HomeViewController?
weak var menuNavigationController: MainMenuViewController?

#if DASHPAY
weak var contactsNavigationController: DWRootContactsViewController?
weak var exploreNavigationController: ExploreViewController?
Expand All @@ -94,7 +90,7 @@ class MainTabbarController: UITabBarController {
@objc
weak var wipeDelegate: DWWipeDelegate?

private var paymentButton: PaymentButton!
private var paymentIsOpened = false
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if paymentIsOpened is read anywhere in the codebase
rg -n 'paymentIsOpened' --type swift -C2

Repository: dashpay/dashwallet-ios

Length of output: 1829


Remove the unused paymentIsOpened property.

This property is assigned in closePayments(), paymentsViewControllerWantsToImportPrivateKey(), and showPaymentsController() but never read. It appears to be dead code from the refactoring that replaced PaymentButton with the EmptyController interceptor pattern.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@DashWallet/Sources/UI/Main/MainTabbarController.swift` at line 93, Remove the
dead stored property paymentIsOpened from MainTabbarController: delete the
declaration `private var paymentIsOpened = false` and remove any assignments to
it in closePayments(), paymentsViewControllerWantsToImportPrivateKey(), and
showPaymentsController(); keep the existing flow implemented by the
EmptyController interceptor/PaymentButton refactor and ensure no other code
references paymentIsOpened (search for the symbol and remove or adapt any
leftover uses).


@objc
var isDemoMode = false
Expand All @@ -105,7 +101,7 @@ class MainTabbarController: UITabBarController {
// TODO: Move it out from here and initialize the model inside home view controller
@objc
var homeModel: DWHomeProtocol!

#if DASHPAY
// TODO: MOCK_DASHPAY remove when not mocked
private var blockchainIdentity: DSBlockchainIdentity? {
Expand Down Expand Up @@ -146,35 +142,15 @@ class MainTabbarController: UITabBarController {
fatalError("init(coder:) has not been implemented")
}

// MARK: Actions

@objc
private func paymentButtonAction() {
showPaymentsController(withActivePage: .none)
}

// MARK: Life Cycle

override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()

tabBar.addSubview(paymentButton)
}

override func viewDidLoad() {
super.viewDidLoad()

delegate = self
configureHierarchy()
tabBar.barTintColor = .dw_background()
setupRatesErrorHandling()
}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

// Add Payment Button again to make sure it's at the top
tabBar.addSubview(paymentButton)
}
}

// MARK: - Private
Expand Down Expand Up @@ -212,13 +188,15 @@ extension MainTabbarController {
}
#endif

// Payment
item = UITabBarItem(title: "", image: UIImage(), tag: 2)
// Payment (tapping this tab opens the payment modal instead of switching tabs)
let paymentImage = Self.makePaymentTabImage()
item = UITabBarItem(title: nil, image: paymentImage, selectedImage: paymentImage)
item.imageInsets = UIEdgeInsets(top: 6, left: 0, bottom: -6, right: 0)
item.accessibilityIdentifier = "tabbar_payments_button"

let vc = EmptyController()
vc.tabBarItem = item
viewControllers.append(vc)
let paymentVC = EmptyController()
paymentVC.tabBarItem = item
viewControllers.append(paymentVC)

#if DASHPAY
if identity != nil {
Expand Down Expand Up @@ -256,25 +234,30 @@ extension MainTabbarController {
self.viewControllers = viewControllers
}

private func configureHierarchy() {
paymentButton = PaymentButton()
paymentButton.translatesAutoresizingMaskIntoConstraints = false
paymentButton.addTarget(self, action: #selector(paymentButtonAction), for: .touchUpInside)
tabBar.addSubview(paymentButton)
/// Creates a tab bar image with a blue circle background and the payment icon centered on top.
private static func makePaymentTabImage() -> UIImage {
let size: CGFloat = 47
let rect = CGRect(x: 0, y: 0, width: size, height: size)

NSLayoutConstraint.activate([
paymentButton.centerXAnchor.constraint(equalTo: tabBar.centerXAnchor),
paymentButton.topAnchor.constraint(equalTo: tabBar.topAnchor, constant: UIDevice.hasHomeIndicator ? 4 : 1),
let renderer = UIGraphicsImageRenderer(size: rect.size)
let image = renderer.image { context in
// Draw blue circle background
UIColor.dw_dashBlue().setFill()
UIBezierPath(ovalIn: rect).fill()

paymentButton.widthAnchor.constraint(equalToConstant: PaymentButton.kCenterCircleSize),
paymentButton.heightAnchor.constraint(equalToConstant: PaymentButton.kCenterCircleSize),
])
// Draw icon centered
if let icon = UIImage(named: "tabbar_pay_button") {
let iconSize = CGSize(width: 22, height: 22)
let iconOrigin = CGPoint(x: (size - iconSize.width) / 2, y: (size - iconSize.height) / 2)
icon.draw(in: CGRect(origin: iconOrigin, size: iconSize))
}
}

tabBar.barTintColor = .dw_background()
return image.withRenderingMode(.alwaysOriginal)
}

private func closePayments(completion: (() -> Void)? = nil) {
paymentButton.isOpened = false
paymentIsOpened = false

guard let top = selectedViewController?.topController(),
top != selectedViewController
Expand Down Expand Up @@ -378,7 +361,7 @@ extension MainTabbarController: PaymentsViewControllerDelegate {
}

func paymentsViewControllerWantsToImportPrivateKey(_ controller: PaymentsViewController) {
paymentButton.isOpened = false
paymentIsOpened = false

controller.dismiss(animated: true) {
self.performScanQRCodeAction()
Expand All @@ -398,7 +381,7 @@ extension MainTabbarController: HomeViewControllerDelegate {
}

func showPaymentsController(withActivePage pageIndex: PaymentsViewControllerState) {
paymentButton.isOpened = true
paymentIsOpened = true

let receiveModel = DWReceiveModel()
let payModel = DWPayModel()
Expand Down Expand Up @@ -427,7 +410,12 @@ extension MainTabbarController: HomeViewControllerDelegate {

extension MainTabbarController: UITabBarControllerDelegate {
func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool {
!(viewController is EmptyController)
if viewController is EmptyController {
// Intercept the payment tab tap — show the payment modal instead of switching tabs
showPaymentsController(withActivePage: .none)
return false
}
return true
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ - (NSAttributedString *)currentSpendingConfirmationDescriptionWithFont:(UIFont *
else if (self.hasFaceID) {
string = NSLocalizedString(@"You can authenticate with Face ID for payments below", nil);
}
NSParameterAssert(string);
else {
string = NSLocalizedString(@"You can authenticate with biometrics for payments below", nil);
}

string = [string stringByAppendingString:@" "];

Expand Down
Loading
Loading