Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix schedule POST deserialization #69

Merged
merged 1 commit into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ <h2>Queue batches of lightning channels to open in a single transaction</h2>
x-flex direction="column">
<fieldset>
<legend>Queue Channels to Open</legend>
<br>
<!-- channels -->
<x-grid columns=2 id="channels">
<label id="destinationLabel" span=1>Destination Node</label><label id="capacityLabel" span=1>Channel Capacity (sats)</label>
Expand Down
2 changes: 1 addition & 1 deletion src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async fn handle_schedule(
) -> Result<Response<Body>, HttpError> {
let bytes = hyper::body::to_bytes(req.into_body()).await?;
// deserialize x-www-form-urlencoded data with non-strict encoded "channel[arrayindex]"
let conf = serde_qs::Config::new(2, false);
let conf = serde_qs::Config::new(5, false); // 5 is default max_depth
let request: ChannelBatch = conf.deserialize_bytes(&bytes)?;

let (uri, address) = scheduler.schedule_payjoin(request).await?;
Expand Down