Skip to content

Commit

Permalink
chore: handle remaining error states
Browse files Browse the repository at this point in the history
  • Loading branch information
reez authored Jun 14, 2024
1 parent 95d1682 commit 6fe9298
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,7 @@ class LightningNodeService {
}
nodeBuilder.setEntropyBip39Mnemonic(mnemonic: mnemonic, passphrase: nil)

// TODO: -!
/// 06.22.23
/// Breaking change in ldk-node 0.1 today
/// `build` now `throws`
/// - Resolve by actually handling error
let ldkNode = try! nodeBuilder.build()
let ldkNode = try! nodeBuilder.build() // Handle error instead of "!"
self.ldkNode = ldkNode
}

Expand Down
2 changes: 1 addition & 1 deletion LDKNodeMonday/View/Home/Send/AmountView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ struct AmountView: View {
} else {
viewModel.amountConfirmationViewError = .init(
title: "Unexpected error",
detail: "Not sure" // TODO: do better
detail: "Unknown error occured"
)
}
case .isLightningURL:
Expand Down
7 changes: 6 additions & 1 deletion LDKNodeMonday/View/Profile/Channel/ChannelAddView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ struct ChannelAddView: View {
)
}
} else {
// TODO: Handle
DispatchQueue.main.async {
viewModel.channelAddViewError = .init(
title: "Unexpected error",
detail: "Failed to retrieve string from pasteboard."
)
}
}
} else {
DispatchQueue.main.async {
Expand Down

0 comments on commit 6fe9298

Please sign in to comment.