You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure what the best solution is, perhaps to have a different response struct for each endpoint? Then we could refactor send_shdw_txn to have a response type associated with it? send_shdw_txn<AddStorageResponse> for example.
The text was updated successfully, but these errors were encountered:
dboures
changed the title
ShdwDriveResponse causes errors
ShdwDriveResponse causes parsing errors
Jul 30, 2022
While testing the
add_immutable_storage
method, I noticed that the parsing ofShdwDriveResponse
was causing Rust to panic. For example: ReqwestError(reqwest::Error { kind: Decode, source: Error("missing fieldtxid
", line: 1, column: 231) })'https://github.com/VegetarianOrc/shadow-drive-rust/blob/a4cb2acb24fa8185906db8540fb0e38445ff71ef/src/models.rs#L24-L26
In V1.5 different SHDW endpoints tend to have different fields in their responses (txid is largely missing). See /add-storage in https://shdw.genesysgo.com/using-shadow-drive/the-shadow-drive-platform/shadow-drive-api for example.
I'm not sure what the best solution is, perhaps to have a different response struct for each endpoint? Then we could refactor
send_shdw_txn
to have a response type associated with it?send_shdw_txn<AddStorageResponse>
for example.The text was updated successfully, but these errors were encountered: