Skip to content

Commit de601cf

Browse files
Merge pull request #1177 from getlipa/feature/remove-no-onchain-funds-error
Remove no onchain funds runtime error
2 parents 1fddf56 + 3ca2b07 commit de601cf

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

src/errors.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ pub enum RuntimeErrorCode {
1616
BackupServiceUnavailable,
1717
/// No backup was found for the provided mnemonic.
1818
BackupNotFound,
19-
/// No on-chain funds are available to resolve.
20-
NoOnChainFundsToResolve,
2119

2220
// Breez runtime errors
2321
/// Information about the remote node isn't cached and couldn't be accessed. Could be a network error.

src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,7 @@ impl LightningNode {
21912191

21922192
/// Returns the fees for resolving channel closes if there are enough funds to pay for fees.
21932193
///
2194-
/// Throws an [`RuntimeErrorCode::NoOnChainFundsToResolve`] error if no on-chain funds are available to resolve.
2194+
/// Must only be called when there are onchain funds to resolve.
21952195
///
21962196
/// Returns the fee information for the available resolving options.
21972197
///
@@ -2209,10 +2209,7 @@ impl LightningNode {
22092209
.as_msats();
22102210

22112211
if onchain_balance.msats == 0 {
2212-
runtime_error!(
2213-
RuntimeErrorCode::NoOnChainFundsToResolve,
2214-
"No on-chain funds to resolve"
2215-
)
2212+
invalid_input!("No on-chain funds to resolve")
22162213
}
22172214

22182215
let lsp_fees =

src/lipalightninglib.udl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,6 @@ enum RuntimeErrorCode {
764764
"LspServiceUnavailable",
765765
"BackupServiceUnavailable",
766766
"BackupNotFound",
767-
"NoOnChainFundsToResolve",
768767
"NodeUnavailable",
769768
"FailedFundMigration",
770769
};

0 commit comments

Comments
 (0)