-
Notifications
You must be signed in to change notification settings - Fork 9
spm: ldk-node local main #88
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,8 +15,10 @@ class BitcoinViewModel: ObservableObject { | |
| @Published var totalBalance: UInt64 = 0 | ||
| @Published var totalLightningBalance: UInt64 = 0 | ||
| @Published var lightningBalances: [LightningBalance] = [] | ||
| @Published var status: NodeStatus? | ||
| @Published var isSpendableBalanceFinished: Bool = false | ||
| @Published var isTotalBalanceFinished: Bool = false | ||
| @Published var isStatusFinished: Bool = false | ||
| @Published var isTotalLightningBalanceFinished: Bool = false | ||
| @Published var isPriceFinished: Bool = false | ||
| let priceClient: PriceClient | ||
|
|
@@ -59,6 +61,14 @@ class BitcoinViewModel: ObservableObject { | |
| } | ||
| } | ||
|
|
||
| func getStatus() async { | ||
| let status = LightningNodeService.shared.status() | ||
| DispatchQueue.main.async { | ||
| self.status = status | ||
| self.isStatusFinished = true | ||
| } | ||
| } | ||
|
Comment on lines
+64
to
+70
Contributor
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. Consider adding error handling for the |
||
|
|
||
| func getPrices() async { | ||
| do { | ||
| let price = try await priceClient.fetchPrice() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,8 @@ class NodeIDViewModel: ObservableObject { | |
| @Published var nodeID: String = "" | ||
| @Published var network: String? | ||
| @Published var esploraURL: String? | ||
| @Published var status: NodeStatus? | ||
| @Published var isStatusFinished: Bool = false | ||
| let keyClient: KeyClient | ||
|
|
||
| init(keyClient: KeyClient = .live) { | ||
|
|
@@ -75,6 +77,14 @@ class NodeIDViewModel: ObservableObject { | |
| } | ||
| } | ||
|
|
||
| func getStatus() async { | ||
| let status = LightningNodeService.shared.status() | ||
| DispatchQueue.main.async { | ||
| self.status = status | ||
| self.isStatusFinished = true | ||
| } | ||
| } | ||
|
Comment on lines
+80
to
+86
Contributor
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. Consider adding error handling for the |
||
|
|
||
| func onboarding() { | ||
| do { | ||
| try LightningNodeService.shared.stop() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The verification process confirms that the local
ldk-nodeSwift bindings were not found at the specified path../ldk-node/bindings/swift. This suggests that the path might be incorrect or the directory structure has changed. It's essential to ensure the correct path is used to reference the localldk-nodeSwift bindings for the experimental integration efforts mentioned in the PR objectives.Analysis chain
Switching to a local Swift package for
ldk-nodeby adding aXCLocalSwiftPackageReferenceis a significant change. It allows the project to directly reference a local copy ofldk-node, which is essential for the experimental integration efforts mentioned in the PR objectives. Ensure the path../ldk-node/bindings/swiftcorrectly points to the localldk-nodeSwift bindings.Scripts Executed
The following scripts were executed for the analysis:
Script:
Length of output: 162