-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IBC client state and connection channels endpoint #270
Add IBC client state and connection channels endpoint #270
Conversation
"client_id": raw_connection.client_id, | ||
"versions": raw_connection.versions, | ||
"state": match raw_connection.state { | ||
0 => "STATE_UNINITIALIZED_UNSPECIFIED", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's an enum in ibc-proto called State, which is a representation of i32, and it has the function to represent it as string, but I haven't figured out how to convert i32 to this State as it doesn't implement From<i32>
, therefore I copied this, please let me know if there's a more simple way, as this looks really ugly but I didn't figure out how to make it better
3 => "STATE_OPEN", | ||
i32::MIN..=-1_i32 | 4_i32..=i32::MAX => "STATE_UNINITIALIZED_UNSPECIFIED" | ||
}, | ||
"ordering": match channel.ordering { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as with State enum
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #270 +/- ##
==========================================
Coverage ? 37.39%
==========================================
Files ? 26
Lines ? 9317
Branches ? 0
==========================================
Hits ? 3484
Misses ? 5833
Partials ? 0 ☔ View full report in Codecov by Sentry. |
3b2e334
to
4107673
Compare
Most of the changes are the result of
cargo fmt
, the only changes that affect something are the last 2 functions added.