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
18 changes: 7 additions & 11 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,11 @@ jobs:
~/Library/org.swift.swiftpm
Bitkit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: Cache DerivedData
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-deriveddata-${{ hashFiles('**/*.swift', '**/*.m', '**/*.h', 'Bitkit.xcodeproj/project.pbxproj') }}
restore-keys: |
${{ runner.os }}-deriveddata-

- name: Install dependencies
run: |
echo "⏱️ Starting dependency resolution at $(date)"
xcodebuild -resolvePackageDependencies | xcbeautify
xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile | xcbeautify
echo "✅ Dependencies resolved at $(date)"

- name: Pre-start simulator
Expand All @@ -64,6 +54,12 @@ jobs:
xcrun simctl boot "iPhone 16" || true
echo "✅ Simulator started at $(date)"

- name: Clean build
run: |
echo "⏱️ Cleaning build at $(date)"
xcodebuild clean -scheme Bitkit | xcbeautify
echo "✅ Build cleaned at $(date)"

- name: Run integration tests
run: |
echo "⏱️ Starting integration tests at $(date)"
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,11 @@ jobs:
~/Library/org.swift.swiftpm
Bitkit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: Cache DerivedData
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-deriveddata-${{ hashFiles('**/*.swift', '**/*.m', '**/*.h', 'Bitkit.xcodeproj/project.pbxproj') }}
restore-keys: |
${{ runner.os }}-deriveddata-

- name: Install dependencies
run: |
echo "⏱️ Starting dependency resolution at $(date)"
xcodebuild -resolvePackageDependencies | xcbeautify
xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile | xcbeautify
echo "✅ Dependencies resolved at $(date)"

- name: Pre-start simulator
Expand All @@ -63,6 +53,12 @@ jobs:
xcrun simctl boot "iPhone 16" || true
echo "✅ Simulator started at $(date)"

- name: Clean build
run: |
echo "⏱️ Cleaning build at $(date)"
xcodebuild clean -scheme Bitkit | xcbeautify
echo "✅ Build cleaned at $(date)"

- name: Run unit tests
run: |
echo "⏱️ Starting unit tests at $(date)"
Expand Down
2 changes: 0 additions & 2 deletions Bitkit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
Services/MigrationsService.swift,
Services/ServiceQueue.swift,
Services/VssStoreIdProvider.swift,
Utilities/AddressChecker.swift,
Utilities/Crypto.swift,
Utilities/Errors.swift,
Utilities/Keychain.swift,
Expand All @@ -118,7 +117,6 @@
Services/LightningService.swift,
Services/ServiceQueue.swift,
Services/VssStoreIdProvider.swift,
Utilities/AddressChecker.swift,
Utilities/Crypto.swift,
Utilities/Errors.swift,
Utilities/Keychain.swift,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions Bitkit/AppScene.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ struct AppScene: View {
.onChange(of: currency.hasStaleData, perform: handleCurrencyStaleData)
.onChange(of: wallet.walletExists, perform: handleWalletExistsChange)
.onChange(of: wallet.nodeLifecycleState, perform: handleNodeLifecycleChange)
.onChange(of: wallet.totalBalanceSats, perform: handleBalanceChange)
.onChange(of: scenePhase, perform: handleScenePhaseChange)
.environmentObject(app)
.environmentObject(navigation)
Expand Down Expand Up @@ -215,11 +214,6 @@ struct AppScene: View {
app?.handleLdkNodeEvent(lightningEvent)
}

wallet.addOnEvent(id: "activity-sync") { [weak activity] (_: Event) in
// TODO: this might not be the best for performace to sync all payments on every event. Could switch to habdling the specific event.
Task { try? await activity?.syncLdkNodePayments() }
}

if wallet.isRestoringWallet {
Task {
await BackupService.shared.performFullRestoreFromLatestBackup()
Expand Down Expand Up @@ -284,11 +278,6 @@ struct AppScene: View {
}
}

private func handleBalanceChange(_: Int) {
// Anytime we receive a balance update, we should sync the payments to activity list
Task { try? await activity.syncLdkNodePayments() }
}

private func handleScenePhaseChange(_: ScenePhase) {
// If PIN is enabled, lock the app when the app goes to the background
if scenePhase == .background && settings.pinEnabled {
Expand Down
4 changes: 3 additions & 1 deletion Bitkit/Components/ToastView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ struct ToastView: View {
)
.cornerRadius(8)
.shadow(color: .black.opacity(0.2), radius: 8, x: 0, y: 4)
.accessibilityIdentifierIfPresent(toast.accessibilityIdentifier)
}

private var accentColor: Color {
Expand All @@ -68,7 +69,8 @@ struct ToastView: View {
title: "Hey toast",
description: "This is a toast message",
autoHide: true,
visibilityTime: 4.0
visibilityTime: 4.0,
accessibilityIdentifier: nil
), onDismiss: {}
)
.preferredColorScheme(.dark)
Expand Down
1 change: 1 addition & 0 deletions Bitkit/Models/Toast.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ struct Toast: Equatable {
let description: String?
let autoHide: Bool
let visibilityTime: Double
let accessibilityIdentifier: String?
}
10 changes: 10 additions & 0 deletions Bitkit/Resources/Localization/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,14 @@
"wallet__toast_payment_success_description" = "Your instant payment was sent successfully.";
"wallet__toast_payment_failed_title" = "Payment Failed";
"wallet__toast_payment_failed_description" = "Your instant payment failed. Please try again.";
"wallet__toast_received_transaction_replaced_title" = "Received Transaction Replaced";
"wallet__toast_received_transaction_replaced_description" = "Your received transaction was replaced by a fee bump";
"wallet__toast_transaction_replaced_title" = "Transaction Replaced";
"wallet__toast_transaction_replaced_description" = "Your transaction was replaced by a fee bump";
"wallet__toast_transaction_unconfirmed_title" = "Transaction Unconfirmed";
"wallet__toast_transaction_unconfirmed_description" = "Transaction became unconfirmed due to blockchain reorganization";
"wallet__toast_transaction_removed_title" = "Transaction Removed";
"wallet__toast_transaction_removed_description" = "Transaction was removed from mempool";
"wallet__selection_title" = "Coin Selection";
"wallet__selection_auto" = "Auto";
"wallet__selection_total_required" = "Total required";
Expand Down Expand Up @@ -1046,6 +1054,8 @@
"wallet__activity_output" = "{count, plural, one {OUTPUT} other {OUTPUTS (#)}}";
"wallet__activity_boosted_cpfp" = "BOOSTED TRANSACTION {num} (CPFP)";
"wallet__activity_boosted_rbf" = "BOOSTED TRANSACTION {num} (RBF)";
"wallet__activity_boost_fee" = "Boost Fee";
"wallet__activity_boost_fee_description" = "Boosted incoming transaction";
"wallet__activity_explorer" = "Open Block Explorer";
"wallet__activity_successful" = "Successful";
"wallet__activity_invoice_note" = "Invoice note";
Expand Down
Loading
Loading