-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix(rest-api): Checks for existence of bridgeTransactions field #3270
Conversation
WalkthroughThe changes made in this pull request involve a modification to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
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? 🪧 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
Documentation and Community
|
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
🧹 Outside diff range and nitpick comments (1)
packages/rest-api/src/controllers/destinationTxController.ts (1)
Line range hint
18-18
: Consider making the GraphQL endpoint configurableThe GraphQL endpoint is currently hardcoded. To improve flexibility and ease of configuration across different environments, consider moving this value to a configuration file or environment variable.
Here's a suggestion for improvement:
- Create a configuration file or use environment variables to store the GraphQL endpoint.
- Update the code to use the configured value:
- const graphqlEndpoint = 'https://explorer.omnirpc.io/graphql' + const graphqlEndpoint = process.env.GRAPHQL_ENDPOINT || 'https://explorer.omnirpc.io/graphql'This change would make it easier to update the endpoint without modifying the code and to use different endpoints in various environments.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- packages/rest-api/src/controllers/destinationTxController.ts (1 hunks)
🧰 Additional context used
🔇 Additional comments (1)
packages/rest-api/src/controllers/destinationTxController.ts (1)
49-49
: Excellent addition of optional chaining!This change improves the robustness of the code by safely handling cases where
bridgeTransactions
might be undefined or null. It prevents potential runtime errors and aligns with best practices for working with potentially undefined properties.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3270 +/- ##
=============================================
Coverage 31.76937% 31.76937%
=============================================
Files 427 427
Lines 28496 28496
Branches 82 82
=============================================
Hits 9053 9053
Misses 18597 18597
Partials 846 846
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Deploying sanguine-fe with
|
Latest commit: |
c94c298
|
Status: | ✅ Deploy successful! |
Preview URL: | https://eaf1ddd3.sanguine-fe.pages.dev |
Branch Preview URL: | https://rest-api-existence-check.sanguine-fe.pages.dev |
Summary by CodeRabbit