Skip to content

remove emojis and rename RPC environment variable#50

Open
moltrus wants to merge 2 commits intoIQAIcom:mainfrom
moltrus:main
Open

remove emojis and rename RPC environment variable#50
moltrus wants to merge 2 commits intoIQAIcom:mainfrom
moltrus:main

Conversation

@moltrus
Copy link
Copy Markdown

@moltrus moltrus commented Mar 15, 2026

Description

Emoji Removal

Replaced all emojis and Unicode characters (like ✅, 📝, 🚀, and →) in log messages and internal labels with standard ASCII characters (true, false, and ->). Because MCP uses the same console (STDOUT) for data, Claude Desktop tries to parse that checkmark as JSON, fails, and stops loading the tools entirely.

Configuration Update: Renamed POLYMARKET_RPC_URL to POLYGON_RPC_URL.

This provides better clarity as the RPC specifically connects to the Polygon network rather than a Polymarket-specific infrastructure.

image

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on improving compatibility and clarity within the project. It removes problematic emoji and Unicode characters from log outputs and internal labels to prevent parsing issues with tools like Claude Desktop. Additionally, it renames an environment variable for Polygon RPC to enhance its descriptive accuracy.

Highlights

  • Emoji and Unicode Character Removal: Replaced various emojis (e.g., ✅, 📝, 🚀) and Unicode characters (e.g., →) in log messages and internal labels with standard ASCII equivalents (e.g., "true", "false", "->"). This change addresses an issue where Claude Desktop's MCP console would misinterpret these characters as JSON, causing parsing failures and preventing tool loading.
  • Environment Variable Renaming: Renamed the POLYMARKET_RPC_URL environment variable to POLYGON_RPC_URL across the codebase and documentation. This provides clearer semantics, indicating that the RPC URL specifically pertains to the Polygon network rather than a Polymarket-specific infrastructure.
Changelog
  • .github/actions/generate-mcp-tools/generate-tools.mjs
    • Replaced the '✅' emoji with the string 'true' or 'false' for the 'requiredStr' variable in schema rendering.
  • README.md
    • Updated the example configuration to use POLYGON_RPC_URL instead of POLYMARKET_RPC_URL.
    • Modified the environment variable table to reflect the POLYGON_RPC_URL name and description.
  • src/index.ts
    • Removed emojis (✅, ℹ️, 🚨) from console log messages related to trading feature status and error handling.
  • src/script.ts
    • Eliminated emojis (🚀, 📋, ✅, 📊, ❌, 🎉, 💥) from various console log messages throughout the script, including order placement, results, and script completion status.
  • src/services/approvals.ts
    • Replaced the Unicode arrow character '→' with the ASCII '->' in 'label' properties for approval keys.
  • src/services/config.ts
    • Updated the 'rpcUrl' configuration logic to prioritize process.env.POLYGON_RPC_URL over the old POLYMARKET_RPC_URL.
  • src/services/trading.ts
    • Removed emojis (✓, 📝, 🚀) from console log messages indicating client initialization and order placement.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes emojis and Unicode characters from log messages and labels to prevent parsing issues, and renames the POLYMARKET_RPC_URL environment variable to POLYGON_RPC_URL for better clarity. The changes are well-aligned with the description. I've suggested one improvement to maintain backward compatibility for the renamed environment variable, which would make the transition smoother for existing users.

Comment thread src/services/config.ts
const rpcUrl =
overrides.rpcUrl ??
process.env.POLYMARKET_RPC_URL ??
process.env.POLYGON_RPC_URL ??
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To maintain backward compatibility, consider also checking for the old POLYMARKET_RPC_URL environment variable if POLYGON_RPC_URL is not set. This would prevent breaking setups for existing users and make the transition smoother.

		process.env.POLYGON_RPC_URL ??
		process.env.POLYMARKET_RPC_URL ??

@moltrus moltrus marked this pull request as draft March 16, 2026 02:53
@moltrus moltrus marked this pull request as ready for review March 16, 2026 03:10
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.

1 participant