From cdd7b467318396328bc834c4cf0f159b8ef611fe Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 9 Apr 2026 11:13:24 -0500 Subject: [PATCH 1/5] refactor(activity): use Txid comparison for output sorting --- BDKSwiftExampleWallet/View/Activity/LocalOutputListView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BDKSwiftExampleWallet/View/Activity/LocalOutputListView.swift b/BDKSwiftExampleWallet/View/Activity/LocalOutputListView.swift index f876be96..b5b8b951 100644 --- a/BDKSwiftExampleWallet/View/Activity/LocalOutputListView.swift +++ b/BDKSwiftExampleWallet/View/Activity/LocalOutputListView.swift @@ -30,7 +30,7 @@ struct LocalOutputListView: View { .listRowSeparator(.hidden) } else { let sortedOutputs = localOutputs.sorted { lhs, rhs in - lhs.outpoint.txid.description < rhs.outpoint.txid.description + lhs.outpoint.txid < rhs.outpoint.txid } ForEach(sortedOutputs, id: \.outpoint) { output in LocalOutputItemView( From d218cb7d290dae4d71ca672721f02292b0a39208 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 9 Apr 2026 11:13:40 -0500 Subject: [PATCH 2/5] refactor(activity): compare networks as enums --- .../View Model/Activity/TransactionDetailViewModel.swift | 8 ++++---- .../View Model/Activity/TransactionListViewModel.swift | 5 ++--- .../View/Activity/TransactionDetailView.swift | 2 +- .../View/Activity/TransactionListView.swift | 7 ++++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/BDKSwiftExampleWallet/View Model/Activity/TransactionDetailViewModel.swift b/BDKSwiftExampleWallet/View Model/Activity/TransactionDetailViewModel.swift index c3c42059..9d10b393 100644 --- a/BDKSwiftExampleWallet/View Model/Activity/TransactionDetailViewModel.swift +++ b/BDKSwiftExampleWallet/View Model/Activity/TransactionDetailViewModel.swift @@ -16,7 +16,7 @@ class TransactionDetailViewModel { var esploraError: EsploraError? var esploraURL: String? - var network: String? + var network: Network? var showingTransactionDetailsViewErrorAlert = false var transactionDetailsError: AppError? @@ -30,13 +30,13 @@ class TransactionDetailViewModel { let savedEsploraURL = bdkClient.getEsploraURL() switch network { - case "signet": + case .signet: if savedEsploraURL == Constants.Networks.Signet.Regular.esploraServers.first { self.esploraURL = "https://mempool.space/signet" } else { self.esploraURL = "https://mutinynet.com" } - case "testnet": + case .testnet: if savedEsploraURL == Constants.Networks.Testnet.esploraServers.last { self.esploraURL = "https://blockstream.info/testnet" } else { @@ -48,7 +48,7 @@ class TransactionDetailViewModel { } func getNetwork() { - self.network = bdkClient.getNetwork().description + self.network = bdkClient.getNetwork() } } diff --git a/BDKSwiftExampleWallet/View Model/Activity/TransactionListViewModel.swift b/BDKSwiftExampleWallet/View Model/Activity/TransactionListViewModel.swift index e468f20a..658874d4 100644 --- a/BDKSwiftExampleWallet/View Model/Activity/TransactionListViewModel.swift +++ b/BDKSwiftExampleWallet/View Model/Activity/TransactionListViewModel.swift @@ -40,9 +40,8 @@ class TransactionListViewModel { return savedEsploraURL } - func getNetwork() -> String { - let savedNetwork = bdkClient.getNetwork().description - return savedNetwork + func getNetwork() -> Network { + bdkClient.getNetwork() } } diff --git a/BDKSwiftExampleWallet/View/Activity/TransactionDetailView.swift b/BDKSwiftExampleWallet/View/Activity/TransactionDetailView.swift index 3d957c76..f9b52d20 100644 --- a/BDKSwiftExampleWallet/View/Activity/TransactionDetailView.swift +++ b/BDKSwiftExampleWallet/View/Activity/TransactionDetailView.swift @@ -105,7 +105,7 @@ struct TransactionDetailView: View { Spacer() HStack { - if viewModel.network != Network.regtest.description { + if viewModel.network != .regtest { Button { if let esploraURL = viewModel.esploraURL { let urlString = diff --git a/BDKSwiftExampleWallet/View/Activity/TransactionListView.swift b/BDKSwiftExampleWallet/View/Activity/TransactionListView.swift index 24a21e30..a6efd54f 100644 --- a/BDKSwiftExampleWallet/View/Activity/TransactionListView.swift +++ b/BDKSwiftExampleWallet/View/Activity/TransactionListView.swift @@ -50,9 +50,10 @@ struct TransactionListView: View { let signetNetwork = Constants.Config.SignetNetwork.from( esploraURL: viewModel.getEsploraURL() ) + let network = viewModel.getNetwork() - if viewModel.getNetwork() != Network.testnet.description - && viewModel.getNetwork() != Network.testnet4.description + if network != .testnet + && network != .testnet4 { Button { if let faucetURL = signetNetwork.defaultFaucet { @@ -73,7 +74,7 @@ struct TransactionListView: View { let testnet4FaucetURL = Constants.Networks.Testnet4.Faucet.mempool.url if let testnet4FaucetURL, - viewModel.getNetwork() == Network.testnet4.description + network == .testnet4 { Button { UIApplication.shared.open( From b1d7550041a0f26c0c8e70fca1b531b010d26450 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 9 Apr 2026 11:26:35 -0500 Subject: [PATCH 3/5] ci: iphone device --- .github/workflows/ios.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 1996ed75..f41940d9 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -25,6 +25,6 @@ jobs: - name: List Devices run: xcrun xctrace list devices 2>&1 - name: Build - run: xcodebuild build-for-testing -scheme BDKSwiftExampleWallet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17,OS=26.1' + run: xcodebuild build-for-testing -scheme BDKSwiftExampleWallet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17' - name: Run tests - run: xcodebuild test-without-building -scheme BDKSwiftExampleWallet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17,OS=26.1' + run: xcodebuild test-without-building -scheme BDKSwiftExampleWallet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17' From 1502abf29e0372b2e6e41e825b826ef2a440d23b Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 9 Apr 2026 11:28:01 -0500 Subject: [PATCH 4/5] ci: update iOS workflow for current GitHub runners --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index f41940d9..6a69081d 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v5 - name: Select Xcode Version run: sudo xcode-select -switch /Applications/Xcode_26.0.app - name: Set Default Scheme From 11cde2d425f6f8c362a4968719e895e96e03a081 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 9 Apr 2026 11:37:38 -0500 Subject: [PATCH 5/5] ci: use the default Xcode on macos-26 runners --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 6a69081d..5b0cbfe5 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout uses: actions/checkout@v5 - name: Select Xcode Version - run: sudo xcode-select -switch /Applications/Xcode_26.0.app + run: sudo xcode-select -switch /Applications/Xcode.app - name: Set Default Scheme run: | scheme_list=$(xcodebuild -list -json | tr -d "\n")