-
Notifications
You must be signed in to change notification settings - Fork 38
fix: Enhance error handling for connection issues in TapSigner flow NFC interactions #689
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,9 @@ | |||||
|
|
||||||
| private let walletModeChangeDelayMs = 250 | ||||||
|
|
||||||
| @Observable final class AppManager: FfiReconcile { | ||||||
| @MainActor | ||||||
| @Observable | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trim trailing whitespace. swiftformat is flagging a trailing space after Proposed fix-@Observable
+@Observable📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Check: swiftformat[warning] 8-8: 🤖 Prompt for AI Agents |
||||||
| final class AppManager: FfiReconcile { | ||||||
|
Comment on lines
+7
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Find FfiReconcile protocol declaration and call sites that may now cross actor boundaries.
rg -nP '\bprotocol\s+FfiReconcile\b' --type=swift -C5
rg -nP '\bAppManager\.shared\.(dispatch|pushRoute|popRoute|setRoute|resetRoute|reset|reloadWallets|selectWallet|loadWallets|toggleSidebar)\b' --type=swift -C2
rg -nP '\b\.reconcile\s*\(' --type=swift -C2Repository: bitcoinppl/cove Length of output: 6326 🏁 Script executed: # Get the full FfiReconcile protocol definition with isolation attributes
rg -A 20 'public protocol FfiReconcile' --type=swift ios/CoveCore/Sources/CoveCore/generated/cove.swiftRepository: bitcoinppl/cove Length of output: 827 🏁 Script executed: # Get AppManager.reconcile() and dispatch(action:) implementations
cat -n ios/Cove/AppManager.swift | head -350 | tail -150Repository: bitcoinppl/cove Length of output: 5335 🏁 Script executed: # Check the context of AuthManager.reset() call
cat -n ios/Cove/AuthManager.swift | sed -n '115,130p'Repository: bitcoinppl/cove Length of output: 443 🏁 Script executed: # Get broader context around AuthManager.reset() call
cat -n ios/Cove/AuthManager.swift | sed -n '100,135p'Repository: bitcoinppl/cove Length of output: 1205 🏁 Script executed: # Find all dispatch(action:) calls to check their context
rg -n 'dispatch\(action:' --type=swift -B 3 -A 1Repository: bitcoinppl/cove Length of output: 50371 🏁 Script executed: # Check for any Swift compilation errors in the project
find . -name "*.swift" -type f | head -5Repository: bitcoinppl/cove Length of output: 276 🏁 Script executed: # Search for nonisolated declarations in AppManager or similar patterns
rg -n 'nonisolated func (reconcile|dispatch)' --type=swiftRepository: bitcoinppl/cove Length of output: 41 🏁 Script executed: # Check if there are any `@unchecked` Sendable or actor isolation suppression patterns
rg -n '@unchecked|nonisolated|-suppress' --type=swift ios/Cove/AppManager.swiftRepository: bitcoinppl/cove Length of output: 41 🏁 Script executed: # Check AppManager.swift around the reconcile and dispatch methods for any actor isolation issues
cat -n ios/Cove/AppManager.swift | sed -n '238,245p'Repository: bitcoinppl/cove Length of output: 348 🏁 Script executed: # Look for any build configuration or Swift settings that enable strict concurrency
fd -i 'build.settings|swiftsettings|xcconfig' --type f | head -10Repository: bitcoinppl/cove Length of output: 41 🏁 Script executed: # Check if there are any generated error/warning indicators in the codebase
rg -i 'error:|warning:|fixme' ios/Cove/AppManager.swift | head -20Repository: bitcoinppl/cove Length of output: 131 Mark The class-level 🧰 Tools🪛 GitHub Check: swiftformat[warning] 8-8: 🤖 Prompt for AI Agents |
||||||
| static let shared = makeShared() | ||||||
|
|
||||||
| private let logger = Log(id: "AppManager") | ||||||
|
|
@@ -93,6 +95,7 @@ | |||||
| self.rust.listenForUpdates(updater: self) | ||||||
| } | ||||||
|
|
||||||
| @MainActor | ||||||
| public func getWalletManager(id: WalletId) throws -> WalletManager { | ||||||
| if let walletvm = walletManager, walletvm.id == id { | ||||||
| logger.debug("found and using vm for \(id)") | ||||||
|
|
@@ -107,6 +110,7 @@ | |||||
| return walletManager! | ||||||
| } | ||||||
|
|
||||||
| @MainActor | ||||||
| public func getSendFlowManager(_ wm: WalletManager, presenter: SendFlowPresenter) -> SendFlowManager { | ||||||
| let id = wm.id | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,8 @@ | ||||||
| import SwiftUI | ||||||
|
|
||||||
| @Observable class ImportWalletManager: ImportWalletManagerReconciler { | ||||||
| @MainActor | ||||||
| @Observable | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trim trailing whitespace. swiftformat is flagging a trailing space after Proposed fix-@Observable
+@Observable📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Check: swiftformat[warning] 4-4: 🤖 Prompt for AI Agents |
||||||
| final class ImportWalletManager: ImportWalletManagerReconciler { | ||||||
| private let logger = Log(id: "ImportWalletManager") | ||||||
| var rust: RustImportWalletManager | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,9 @@ | |||||
|
|
||||||
| extension WeakReconciler: WalletManagerReconciler where Reconciler == WalletManager {} | ||||||
|
|
||||||
| @Observable final class WalletManager: AnyReconciler, WalletManagerReconciler { | ||||||
| @MainActor | ||||||
| @Observable | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trim trailing whitespace. swiftformat is flagging a trailing space after Proposed fix-@Observable
+@Observable📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Check: swiftformat[warning] 6-6: 🤖 Prompt for AI Agents |
||||||
| final class WalletManager: AnyReconciler, WalletManagerReconciler { | ||||||
|
Comment on lines
+5
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Inspect generated UniFFI bindings & related protocols for actor isolation expectations.
fd -t f 'WalletManagerReconciler|wallet_manager' ios/CoveCore | head -50
rg -nP '\b(protocol|func)\s+(WalletManagerReconciler|reconcile|reconcileMany|dispatch)\b' --type=swift -C2
rg -nP '\bAnyReconciler\b' --type=swift -C3
rg -nP '\bWeakReconciler\b' --type=swift -C3Repository: bitcoinppl/cove Length of output: 34306 🏁 Script executed: cat -n ios/Cove/WalletManager.swift | head -280 | tail -250Repository: bitcoinppl/cove Length of output: 9241 🏁 Script executed: # Check for trailing whitespace on line 6 specifically
sed -n '6p' ios/Cove/WalletManager.swift | od -c | grep -E '(space|tab)$' && echo "Trailing whitespace found" || echo "No trailing whitespace"Repository: bitcoinppl/cove Length of output: 141 🏁 Script executed: # Check if reconcile/reconcileMany methods have nonisolated marker
rg -A 5 'func reconcile\(message:|func reconcileMany\(messages:' ios/Cove/WalletManager.swiftRepository: bitcoinppl/cove Length of output: 542 🏁 Script executed: # Check line 6 directly with hexdump alternative
sed -n '6p' ios/Cove/WalletManager.swift | cat -ARepository: bitcoinppl/cove Length of output: 73 🏁 Script executed: # Search for any recent fixes or build-related comments
rg -i 'mainactor|nonisolated|compilation|doesnt compile|actor isolation' ios/Cove/WalletManager.swiftRepository: bitcoinppl/cove Length of output: 100 🏁 Script executed: # Check if there are any other managers with `@MainActor` to compare pattern
rg '@MainActor' ios/Cove/ --type swift | grep -E 'class|struct'Repository: bitcoinppl/cove Length of output: 41 🏁 Script executed: # Look at other reconciler implementations to see if they use nonisolated
rg -B2 -A8 'func reconcile\(message:' ios/Cove/*.swift | grep -E '(nonisolated|@MainActor|class )' -A1 -B1Repository: bitcoinppl/cove Length of output: 41 🏁 Script executed: # Look for any PR or branch information, recent commits
git log --oneline -20 ios/Cove/WalletManager.swiftRepository: bitcoinppl/cove Length of output: 148 🏁 Script executed: # Check if `@MainActor` is recently added (compare with git)
git show HEAD:ios/Cove/WalletManager.swift | head -10Repository: bitcoinppl/cove Length of output: 353 🏁 Script executed: # Verify current full signature of reconcile to be absolutely certain
sed -n '238,244p' ios/Cove/WalletManager.swiftRepository: bitcoinppl/cove Length of output: 288 🏁 Script executed: # Check generated protocol definition more carefully to see isolation context
rg -A 10 'public protocol WalletManagerReconciler' ios/CoveCore/Sources/CoveCore/generated/cove.swift | head -20Repository: bitcoinppl/cove Length of output: 418 🏁 Script executed: # Final check: does WalletManager or other managers actually have nonisolated on reconcile?
rg 'nonisolated.*func reconcile' ios/Cove/ --type swiftRepository: bitcoinppl/cove Length of output: 41 🏁 Script executed: # Check other managers to see if they have `@MainActor`
rg -B2 'class.*AnyReconciler.*Reconciler {' ios/Cove/ --type swift | grep '@MainActor' | wc -lRepository: bitcoinppl/cove Length of output: 211 🏁 Script executed: # Verify the exact line 6 content with hex
sed -n '6p' ios/Cove/WalletManager.swift | xxdRepository: bitcoinppl/cove Length of output: 103 🏁 Script executed: # Check if the repo has recent actor-related changes
git log --oneline --all -30 | grep -i 'actor\|mainactor\|isolation'Repository: bitcoinppl/cove Length of output: 41 🏁 Script executed: # Verify trailing space on line 6 using sed and wc
sed -n '6p' ios/Cove/WalletManager.swift | wc -c
# Compare with line 5 (should have no trailing space)
sed -n '5p' ios/Cove/WalletManager.swift | wc -cRepository: bitcoinppl/cove Length of output: 65 🏁 Script executed: # Check what line 6 actually contains by looking at raw bytes
sed -n '6p' ios/Cove/WalletManager.swift | od -An -tx1Repository: bitcoinppl/cove Length of output: 102 Add
The internal Also fix trailing whitespace on line 6 ( 🧰 Tools🪛 GitHub Check: swiftformat[warning] 6-6: 🤖 Prompt for AI Agents |
||||||
| typealias Message = WalletManagerReconcileMessage | ||||||
| typealias Action = WalletManagerAction | ||||||
|
|
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.