Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ 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
run: sudo xcode-select -switch /Applications/Xcode.app
- name: Set Default Scheme
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
Expand All @@ -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'
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TransactionDetailViewModel {

var esploraError: EsploraError?
var esploraURL: String?
var network: String?
var network: Network?
var showingTransactionDetailsViewErrorAlert = false
var transactionDetailsError: AppError?

Expand All @@ -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 {
Expand All @@ -48,7 +48,7 @@ class TransactionDetailViewModel {
}

func getNetwork() {
self.network = bdkClient.getNetwork().description
self.network = bdkClient.getNetwork()
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ class TransactionListViewModel {
return savedEsploraURL
}

func getNetwork() -> String {
let savedNetwork = bdkClient.getNetwork().description
return savedNetwork
func getNetwork() -> Network {
bdkClient.getNetwork()
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
7 changes: 4 additions & 3 deletions BDKSwiftExampleWallet/View/Activity/TransactionListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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(
Expand Down