Closed gsk967 closed 5 months ago
The changes in Pull Request 2562 enhance the x/leverage
module of the Umee network by refining how account data is inspected and represented. This involves updates to protocol buffer definitions, Swagger documentation, test cases, and implementation logic, particularly focusing on the introduction and usage of a new PositionBalance
type to improve clarity and functionality in representing token balances and their base amounts.
File | Change Summary |
---|---|
proto/umee/leverage/v1/query.proto |
Added cosmos.proto import, renamed DecCoin to PositionBalance , updated fields in DecBalances message, and introduced PositionBalance . |
swagger/swagger.yaml |
Added title and updated description for properties in PositionBalance , Collateral , and Borrowed . |
x/leverage/keeper/grpc_query_test.go |
Added convertToPositionBalances function for constructing PositionBalance instances. |
x/leverage/keeper/inspector.go |
Modified structures and functions to incorporate baseDenom field and the new PositionBalance type; updated logic in Inspect , InspectAccount , and symbolDecCoins functions. |
sequenceDiagram
participant User
participant Frontend
participant Backend
participant Database
User ->> Frontend: Request Account Details
Frontend ->> Backend: API Call /inspect_account
Backend ->> Database: Query Account Balances
Database -->> Backend: Retrieve Balances
Backend ->> Backend: Convert to PositionBalances
Backend -->> Frontend: Account Details Response
Frontend -->> User: Display Account Info
Amidst the code, a change took place,
Balances gained a clearer face.
WithPositionBalance
, precise and neat,
Inspecting tokens, a tidy feat.
Now Umee's leverage, snug and grand,
Secure and clear, just as planned.
Bravo to code, that stance so true,
In the realm of bytes, we bid it adieu.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 70.37037%
with 8 lines
in your changes missing coverage. Please review.
Project coverage is 62.77%. Comparing base (
7f05ad4
) to head (06b96aa
). Report is 507 commits behind head on main.
Description
added two new fields two the existed inspect query response
Query response
Summary by CodeRabbit
Enhancements
Bug Fixes
Refactor