Skip to content
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

Merged

Conversation

freak12techno
Copy link
Contributor

Most of the changes are the result of cargo fmt, the only changes that affect something are the last 2 functions added.

"client_id": raw_connection.client_id,
"versions": raw_connection.versions,
"state": match raw_connection.state {
0 => "STATE_UNINITIALIZED_UNSPECIFIED",
Copy link
Contributor Author

@freak12techno freak12techno Feb 3, 2024

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 {
Copy link
Contributor Author

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-commenter
Copy link

codecov-commenter commented Feb 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (develop@1cb2400). Click here to learn what that means.

❗ 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.
📢 Have feedback on the report? Share it here.

@mappum mappum force-pushed the add-ibc-client-state-endpoint branch from 3b2e334 to 4107673 Compare February 7, 2024 20:31
@mappum mappum enabled auto-merge February 7, 2024 20:32
@mappum mappum merged commit 85580bb into nomic-io:develop Feb 7, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants