-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: fix
PaymentIndex
not deserializing from query string correctly
It turns out that the `PaymentIndex` in e.g. `get_new_payments` was silently getting dropped due to a `#[serde(flatten)]` + query string limitation. For query strings, using `#[serde(flatten)]` on a field requires that all inner fields must be string-ish types (&str, String, Cow<'_, str>, etc...) OR use `SerializeDisplay` and `DeserializeFromStr`. This issue is due to a limitation in `serde`. See: <serde-rs/serde#1183> The fix here is to remove `#[serde(flatten)]` for querystring serializeable types (actually just `PaymentIndex`) and instead use `SerializeDisplay` and `DeserializeFromStr`
- Loading branch information
Showing
3 changed files
with
14 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters