Skip to content

Commit

Permalink
Expose hide_topup (#680)
Browse files Browse the repository at this point in the history
Co-authored-by: Dominic Leutenegger <dominic@getlipa.com>
  • Loading branch information
andrei-21 and dleutenegger authored Oct 6, 2023
1 parent a276511 commit 425da7c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,12 @@ impl LightningNode {
Ok(topup_info)
}

pub fn hide_topup(&self, id: String) -> Result<()> {
self.offer_manager
.hide_topup(id)
.map_runtime_error_to(RuntimeErrorCode::OfferServiceUnavailable)
}

pub fn query_uncompleted_offers(&self) -> Result<Vec<OfferInfo>> {
let topup_infos = self
.offer_manager
Expand Down
4 changes: 4 additions & 0 deletions src/lipalightninglib.udl
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ interface LightningNode {
[Throws=LnError]
string sweep(string address, u32 onchain_fee);

// Hides the topup with the given id.
[Throws=LnError]
void hide_topup(string id);

// Prints additional debug information to the logs.
//
// Throws an error in case that the necessary information can't be received.
Expand Down

0 comments on commit 425da7c

Please sign in to comment.