Skip to content

chore: warnings #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 21, 2025
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 @@ -9,13 +9,13 @@ on:
jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
runs-on: macos-14
runs-on: macos-15

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Select Xcode Version
run: sudo xcode-select -switch /Applications/Xcode_15.4.app
run: sudo xcode-select -switch /Applications/Xcode_16.3.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 15,OS=17.5'
run: xcodebuild build-for-testing -scheme BDKSwiftExampleWallet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.4'
- name: Run tests
run: xcodebuild test-without-building -scheme BDKSwiftExampleWallet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5'
run: xcodebuild test-without-building -scheme BDKSwiftExampleWallet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.4'
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,10 @@ fastlane/test_output
iOSInjectionProject/

# Other
.DS_Store
.DS_Store

# Xcode Source Packages (SPM)
SourcePackages/

# VS Code specific
.vscode/
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import BitcoinDevKit
import Foundation

extension Amount: Equatable {
extension Amount: @retroactive Equatable {
public static func == (lhs: Amount, rhs: Amount) -> Bool {
return lhs.toSat() == rhs.toSat()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import BitcoinDevKit
import Foundation

extension Balance: Equatable {
extension Balance: @retroactive Equatable {
public static func == (lhs: Balance, rhs: Balance) -> Bool {
return lhs.immature == rhs.immature && lhs.trustedPending == rhs.trustedPending
&& lhs.untrustedPending == rhs.untrustedPending && lhs.confirmed == rhs.confirmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extension Connection {
if FileManager.default.fileExists(atPath: walletDataDirectoryURL.path) {
try FileManager.default.removeItem(at: walletDataDirectoryURL)
}

try FileManager.default.ensureDirectoryExists(at: walletDataDirectoryURL)
try FileManager.default.removeOldFlatFileIfNeeded(at: documentsDirectoryURL)
let persistenceBackendPath = walletDataDirectoryURL.appendingPathComponent("wallet.sqlite")
Expand Down
12 changes: 6 additions & 6 deletions BDKSwiftExampleWallet/Service/BDK Service/BDKService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ private class BDKService {
let localOutputs = wallet.listUnspent()
return localOutputs
}

func createWallet(words: String?) throws {
self.connection = try Connection.createConnection()
guard let connection = connection else {
throw WalletError.dbNotFound
}

let savedURL = try? keyClient.getEsploraURL()
let baseUrl = savedURL ?? network.url

Expand Down Expand Up @@ -138,7 +138,7 @@ private class BDKService {
try keyClient.saveEsploraURL(baseUrl)
self.esploraURL = baseUrl
updateEsploraClient()

let wallet = try Wallet(
descriptor: descriptor,
changeDescriptor: changeDescriptor,
Expand All @@ -153,7 +153,7 @@ private class BDKService {
guard let connection = connection else {
throw WalletError.dbNotFound
}

let savedURL = try? keyClient.getEsploraURL()
let baseUrl = savedURL ?? network.url

Expand Down Expand Up @@ -208,7 +208,7 @@ private class BDKService {
guard let connection = connection else {
throw WalletError.dbNotFound
}

let savedURL = try? keyClient.getEsploraURL()

let baseUrl = savedURL ?? network.url
Expand Down Expand Up @@ -243,7 +243,7 @@ private class BDKService {
try keyClient.saveEsploraURL(baseUrl)
self.esploraURL = baseUrl
updateEsploraClient()

let wallet = try Wallet(
descriptor: descriptor,
changeDescriptor: changeDescriptor,
Expand Down
2 changes: 1 addition & 1 deletion BDKSwiftExampleWallet/Utilities/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// Created by Matthew Ramsden on 6/4/23.
//

import BitcoinDevKit
import Foundation
import SwiftUI
import BitcoinDevKit

struct Constants {
struct Config {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ extension ReceiveViewModel {
func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) {
if let message = messages.first,
let record = message.records.first,
let payload = String(data: record.payload, encoding: .utf8)
let _ = String(data: record.payload, encoding: .utf8)
{
// Handle response
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import BitcoinDevKit
import Foundation
import SwiftUI

@MainActor
class SettingsViewModel: ObservableObject {
let bdkClient: BDKClient

Expand Down