-
Notifications
You must be signed in to change notification settings - Fork 0
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 support for Sonic chain in SumrBalances data structure and retrieval #877
Conversation
WalkthroughA new chain, "sonic," is now added to the balance logic. The Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
Client->>Server: Request balances
Server->>Server: Process chains (incl. sonic)
Server-->>Client: Return balances with sonic = "0"
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
apps/earn-protocol/app/server-handlers/sumr-balances/index.tsOops! Something went wrong! :( ESLint: 8.57.1 Error: ESLint configuration in apps/earn-protocol/.eslintrc.cjs » @summerfi/eslint-config/next.cjs » eslint-config-turbo is invalid:
Referenced from: /packages/eslint-config/next.cjs Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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 (
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/earn-protocol/app/server-handlers/sumr-balances/index.ts
(4 hunks)
🔇 Additional comments (3)
apps/earn-protocol/app/server-handlers/sumr-balances/index.ts (3)
16-16
: Interface updated correctlySonic property added consistently to both main interface and raw object.
Also applies to: 23-23
134-134
: Result object properly initializedDefault values consistently set to '0'.
Also applies to: 141-141
6-6
:❓ Verification inconclusive
Ensure
sonic
is available in viem/chains packageVerify this import works in all environments.
🏁 Script executed:
#!/bin/bash # Check if sonic is properly exported from viem/chains grep -r "export.*sonic" node_modules/viem/Length of output: 96
Manual Check Required: Verify
sonic
Export
- Automated lookup failed (no node_modules folder).
- Please manually confirm that the
sonic
export exists inviem/chains
for all environments.
Introduce the Sonic chain to the SumrBalances data structure, enabling retrieval of balances for this chain alongside existing ones.
Summary by CodeRabbit