-
Notifications
You must be signed in to change notification settings - Fork 237
bump: cosmos-sdk & connect #369
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
Conversation
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the 📝 WalkthroughWalkthroughThis pull request removes the admin account handling from the Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant GS as GenesisState
participant MD as MarketData Init
participant CP as CurrencyPairs Setup
C->>GS: Call AddMarketData()
GS->>MD: Initialize market data (admin logic removed)
GS->>CP: Set up new currency pairs
CP-->>GS: Configuration complete
GS-->>C: Return initialized market data
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/genesis_markets/markets.go (1)
3-1175
: Consider storing this extensive JSON data in a dedicated file or structured configuration.Embedding such a large JSON structure directly in code can reduce maintainability and clarity. A more robust approach might be:
• Define a typed struct to ensure compile-time protection against typos.
• Store this JSON data in a dedicated file and load it at runtime.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
go.mod
is excluded by!**/*.mod
go.sum
is excluded by!**/*.sum
,!**/*.sum
📒 Files selected for processing (2)
app/genesis.go
(0 hunks)app/genesis_markets/markets.go
(1 hunks)
💤 Files with no reviewable changes (1)
- app/genesis.go
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: golangci-lint
- GitHub Check: Run test and upload codecov
- GitHub Check: Analyze (go)
🔇 Additional comments (3)
app/genesis_markets/markets.go (3)
3-4
: Inconsistent summary with new exported constant.The AI-generated summary states that no changes were made to exported or public entities, yet
GenesisMarkets
is clearly declared/updated here. This discrepancy suggests the summary may be incomplete or inaccurate.Likely an incorrect or invalid review comment.
105-123
:❓ Verification inconclusive
Confirm normalization for “SUSDE” pairs.
The “Base”: "SUSDE" but “normalize_by_pair” block corresponds to "USDT" → "USD". Verify if this cross-mapping is intended or if a mismatch may introduce confusion or incorrect price conversions.
🏁 Script executed:
#!/bin/bash # Attempt to detect potential normalization mismatches in the code. # We'll look for SUSDE with normalization to something other than USDE to see if there's a pattern. rg -A 3 --json '"Base": "SUSDE"'Length of output: 1410
Verify Normalization Intent for SUSDE Pairs
The configuration currently specifies the ticker's base as
"SUSDE"
while the normalization block uses"Base": "USDT"
. The search confirms that the"SUSDE"
designation appears only in the ticker block without any alternate normalization mapping elsewhere. Please verify if converting from"SUSDE"
in the ticker to"USDT"
for normalization is intended. If this cross-mapping is by design, it would be helpful to add a clarifying comment in the code to avoid future confusion. Otherwise, consider updating either field to ensure consistency.
540-548
:❓ Verification inconclusive
Double-check the “invert” logic and normalization.
For "huobi_ws" (line 542) referencing
"off_chain_ticker": "ethusdt"
but normalizing to"Base": "ETH", "Quote": "USD"
, and also"invert": true
, confirm this is correct. Inverting might result in unexpected rates if the ticker is already in the base/quote format.
🏁 Script executed:
#!/bin/bash # Search for references to "huobi_ws" and "ethusdt" to confirm usage of "invert" rg -A 5 '"name": "huobi_ws"' | rg 'ethusdt'Length of output: 179
Double-check the
invert
logic for Huobi_ws market configuration.
The search confirms that the ticker"ethusdt"
is used in the configuration, but please verify that the normalization pair—configuring"Base": "ETH"
and"Quote": "USD"
—along with"invert": true
is intentional. If Huobi’s API returns the ticker in a standard base/quote format (typically ETH/USDT), then applying inversion might yield unexpected rates unless there’s an explicit adjustment (for example, handling a conversion from USDT to USD) elsewhere in the codebase.
- Location:
app/genesis_markets/markets.go
(lines 540–548)- Action: Confirm against the Huobi API documentation and ensure that the inversion (and the resulting normalization) is consistent with the expected pricing format.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #369 +/- ##
==========================================
- Coverage 39.93% 39.93% -0.01%
==========================================
Files 277 277
Lines 26872 26862 -10
==========================================
- Hits 10732 10726 -6
+ Misses 14480 14478 -2
+ Partials 1660 1658 -2
🚀 New features to boost your workflow:
|
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...