Skip to content

Add crypto-portfolio-tracker extension - #22516

Merged
raycastbot merged 6 commits into
raycast:mainfrom
narghev:ext/crypto-portfolio-tracker
Nov 13, 2025
Merged

raycastbot merged 6 commits into
raycast:mainfrom
narghev:ext/crypto-portfolio-tracker

Conversation

@narghev

@narghev narghev commented Oct 29, 2025 •

Copy link
Copy Markdown
Contributor

Description

This is an extension to track the balance of Crypto addresses. If it gets enough traction I will implement the features and chains that are written in it's README.

Screencast

crypto-portfolio-tracker-1

Checklist

- update README.md
- update metadata
- add portfolio item actions
- change command title and icon, remove metadata
- change extension name
- change extension name
- update extension icon and screenshots
- add eth address validation
- rename extension to ethereum portfolio tracker
- eth address details
- wip ethereum portfolio list
- add eth wallet command, init portfolio command
- initialize the extension
@raycastbot

raycastbot commented Oct 29, 2025 •

Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

Due to our current reduced availability, the initial review may take up to 10 business days.

Once the PR is approved and merged, the extension will be available on our Store.

@narghev
narghev marked this pull request as ready for review October 29, 2025 20:01

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR introduces a new crypto portfolio tracker extension that allows users to add and monitor Ethereum wallet addresses with real-time balance and price information. The extension includes two commands: one for adding addresses (with optional custom names or auto-generated fun names like "Diamond Hodler") and another for viewing the portfolio in a list view with detailed balance information. The architecture uses LocalStorage for persistence, public RPC endpoints (PublicNode and LlamaRPC) with fallback logic for fetching balances, and CoinGecko's free API for ETH price data cached for 1 minute using @raycast/utils. The codebase is structured with clear separation between API logic (src/api/ethereum.ts), utilities for portfolio management and validation (src/util/), React components for the UI (src/components/), and command entry points. The extension is designed to be extensible, with token configurations structured to easily support additional blockchains in the future.

PR Description Notes:

  • Line 5 has a typo: "Commdands" should be "Commands"

Important Files Changed

Filename Score Overview
extensions/crypto-portfolio-tracker/package.json 3/5 Defines extension metadata and two commands (add-ethereum-address, portfolio); subtitles should reference "Crypto Portfolio Tracker" service per guideline #4
extensions/crypto-portfolio-tracker/src/add-ethereum-address.ts 3/5 No-view command to add Ethereum addresses; missing await before showToast in error handler (line 41)
extensions/crypto-portfolio-tracker/src/portfolio.tsx 4/5 Main portfolio view displaying addresses with detail panel; could benefit from better empty state and error handling
extensions/crypto-portfolio-tracker/src/components/EthAddressDetail.tsx 2/5 Detail component that manually manages state instead of using useCachedPromise from @raycast/utils; displays "undefined" for metadata when balance is null
extensions/crypto-portfolio-tracker/src/hooks/usePortfolio.ts 2/5 Custom hook with incorrect initial loading state (should be true instead of false); should use useCachedPromise instead of manual state management
extensions/crypto-portfolio-tracker/src/api/ethereum.ts 4/5 Implements balance fetching with RPC fallback and price caching; robust error handling and proper use of withCache utility
extensions/crypto-portfolio-tracker/src/util/portfolio.ts 1/5 Portfolio storage management with critical bugs: no JSON.parse error handling and no duplicate address check in addToPortfolio
extensions/crypto-portfolio-tracker/src/util/validation.ts 4/5 Basic Ethereum address validation; doesn't validate EIP-55 checksums but adequate for most use cases
extensions/crypto-portfolio-tracker/src/util/address-name.ts 5/5 Generates display names for addresses with random crypto-themed names or custom names; well-implemented utility
extensions/crypto-portfolio-tracker/src/util/tokens.ts 4/5 Token configuration with unnecessary as const assertion on supportedTokens array
extensions/crypto-portfolio-tracker/.prettierrc 3/5 Custom Prettier config with singleQuote: false deviates from Raycast standards
extensions/crypto-portfolio-tracker/CHANGELOG.md 5/5 Properly formatted with {PR_MERGE_DATE} template string as required
extensions/crypto-portfolio-tracker/README.md 5/5 Clear documentation with typo on line 5 ("Commdands" should be "Commands")
extensions/crypto-portfolio-tracker/eslint.config.js 5/5 Follows the required template exactly as specified in guidelines
extensions/crypto-portfolio-tracker/tsconfig.json 5/5 Standard Raycast extension TypeScript configuration
extensions/crypto-portfolio-tracker/.gitignore 5/5 Standard ignore patterns for Raycast extensions

Confidence score: 2/5

  • This PR has several critical bugs that will cause production issues and require careful review before merging.
  • Score lowered due to: (1) missing await in error toast handler causing crashes, (2) incorrect initial loading state causing empty state flicker, (3) no JSON.parse error handling that could crash the extension, (4) no duplicate address checking that could lose user data, (5) undefined values displayed in metadata, and (6) manual state management instead of using Raycast's useCachedPromise utility.
  • Pay close attention to src/util/portfolio.ts (missing duplicate check and error handling), src/add-ethereum-address.ts (missing await), src/hooks/usePortfolio.ts (incorrect loading state), and src/components/EthAddressDetail.tsx (undefined metadata display and manual state management).

Context used:

  • Context from dashboard - LLMs (source)
  • Context from dashboard - extensions/parcel/.cursor/rules/raycast-extension-guidelines.mdc (source)

16 files reviewed, 15 comments

Edit Code Review Agent Settings | Greptile

@narghev

ghost commented Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

@greptile-apps can you review again?

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This review covers only the changes made since the last review, not the entire PR. The updates address multiple issues identified in previous reviews by improving error handling, validation, and code quality. The extension now uses showFailureToast from @raycast/utils for consistent error messaging, replaces regex-based Ethereum address validation with viem's isAddress utility for proper EIP-55 checksum validation, and wraps JSON.parse in try-catch to handle corrupted LocalStorage gracefully. Additionally, the EthAddressDetail component has been refactored to use useCachedPromise instead of manual state management, which simplifies the code and improves maintainability. Formatting issues like subtitle capitalization and a README typo have also been corrected, and balance calculations now use viem's formatEther utility for safer BigInt handling.

Important Files Changed

Filename Score Overview
extensions/crypto-portfolio-tracker/src/add-ethereum-address.ts 5/5 Replaced manual error toast with showFailureToast utility and added missing await keyword
extensions/crypto-portfolio-tracker/src/util/validation.ts 5/5 Replaced regex validation with viem's isAddress for proper EIP-55 checksum validation
extensions/crypto-portfolio-tracker/README.md 5/5 Fixed typo changing 'Commdands' to 'Commands'
extensions/crypto-portfolio-tracker/package.json 4/5 Fixed subtitle capitalization and added viem dependency
extensions/crypto-portfolio-tracker/src/components/EthAddressDetail.tsx 4/5 Refactored to use useCachedPromise and improved value formatting, but error.message access lacks type safety
extensions/crypto-portfolio-tracker/src/api/ethereum.ts 4/5 Changed to use viem's formatEther for balance calculation, maintaining same precision characteristics
extensions/crypto-portfolio-tracker/src/util/portfolio.ts 5/5 Added try-catch around JSON.parse to handle corrupted LocalStorage data
extensions/crypto-portfolio-tracker/src/hooks/usePortfolio.ts 3/5 Fixed initial loading state but removed loading indicator for refresh operations

Confidence score: 3/5

  • This PR addresses most previous review feedback but introduces a UX regression where manual refreshes lack loading indicators
  • Score lowered due to: (1) missing loading state on refresh in usePortfolio.ts, (2) unsafe error.message access in EthAddressDetail.tsx without type checking, and (3) continuing precision limitations with Number conversion in ethereum.ts
  • Pay close attention to extensions/crypto-portfolio-tracker/src/hooks/usePortfolio.ts (refresh function needs loading feedback) and extensions/crypto-portfolio-tracker/src/components/EthAddressDetail.tsx (error handling needs type safety)

8 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@narghev

ghost commented Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

@greptile-apps can you review again?

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This review covers only the changes made since the last review, not the entire PR. The changes address three previously identified issues: improved error handling in the EthAddressDetail component, better loading state management in usePortfolio hook, and terminology consistency in package.json. The error handling now properly checks if the error is an Error instance before accessing its message property, preventing 'undefined' from being displayed. The portfolio hook now explicitly sets loading state at the start of data fetches, ensuring consistent loading indicators for both initial loads and manual refreshes. The package.json subtitle was updated from 'Import an Eth address' to 'Import an Ethereum address' for consistency with other command metadata. These are all minor refinements that improve code robustness and user experience consistency.

Important Files Changed

Filename Score Overview
extensions/crypto-portfolio-tracker/src/components/EthAddressDetail.tsx 5/5 Improved error handling with proper type checking before accessing error.message property
extensions/crypto-portfolio-tracker/src/hooks/usePortfolio.ts 4/5 Added explicit loading state management at start of portfolio fetch function
extensions/crypto-portfolio-tracker/package.json 5/5 Updated subtitle from 'Eth' to 'Ethereum' for consistent terminology
extensions/crypto-portfolio-tracker/src/api/ethereum.ts N/A File listed but no changes were provided in the diff

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as all changes are incremental improvements to existing code
  • Score reflects straightforward defensive coding improvements and cosmetic text changes, but one point deducted because the loading state change in usePortfolio creates a redundant state update on initial mount (isLoading is already initialized to true, then set to true again immediately in the effect)
  • The usePortfolio.ts file warrants a brief check to ensure the redundant state update on initial mount doesn't cause any subtle rendering issues, though this is unlikely

4 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi 👋

We already have multiple extensions in the store related to crypto. What makes this one different? It would be better to enhance rather than create yet another one

@pernielsentikaer
pernielsentikaer marked this pull request as draft November 3, 2025 14:26
@narghev

ghost commented Nov 3, 2025 •

Copy link
Copy Markdown
Contributor Author

Hi @pernielsentikaer , I did look at existing extensions and I did not find anything that is for tracking wallets and portfolio. A lot of them are price trackers or for example Ethereum Gas Trackers. This one is different by allowing the user to combine multiple chains and wallets into a centralized extension for tracking their entire portfolio. Will be happy to enhance an existing extensions if I know which one mine clashes with.

@narghev
narghev marked this pull request as ready for review November 4, 2025 17:51

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR introduces a new crypto-portfolio-tracker extension for tracking cryptocurrency address balances within Raycast. The extension focuses initially on Ethereum addresses with plans to expand to other blockchain networks based on user adoption. The implementation includes two main commands: adding Ethereum addresses to a portfolio and viewing the complete portfolio with real-time balance data. The extension uses viem for Ethereum interactions, implements proper caching with Raycast's utilities, and provides a clean UI with detailed address views showing ETH balances and USD values. The codebase follows Raycast extension patterns well with custom hooks, utility functions, and proper TypeScript typing throughout.

Important Files Changed

Filename Score Overview
extensions/crypto-portfolio-tracker/package.json 4/5 Defines extension metadata, commands, and dependencies with proper structure
extensions/crypto-portfolio-tracker/src/api/ethereum.ts 4/5 Implements Ethereum API with RPC fallback, balance fetching, and price data
extensions/crypto-portfolio-tracker/src/portfolio.tsx 4/5 Main portfolio view component displaying tracked addresses with actions
extensions/crypto-portfolio-tracker/src/hooks/usePortfolio.ts 4/5 Custom React hook managing portfolio state and local storage integration
extensions/crypto-portfolio-tracker/src/add-ethereum-address.ts 4/5 Command for adding Ethereum addresses with validation and user feedback
extensions/crypto-portfolio-tracker/src/components/EthAddressDetail.tsx 4/5 Detail component showing address balance information with metadata display
extensions/crypto-portfolio-tracker/src/util/portfolio.ts 4/5 Portfolio management utilities for local storage operations
extensions/crypto-portfolio-tracker/src/util/address-name.ts 4/5 Address naming utilities for generating human-readable address identifiers
extensions/crypto-portfolio-tracker/src/util/validation.ts 5/5 Simple Ethereum address validation using viem's isAddress function
extensions/crypto-portfolio-tracker/src/util/tokens.ts 4/5 Token configuration with enum and display properties mapping
extensions/crypto-portfolio-tracker/CHANGELOG.md 5/5 Proper changelog with correct template format for new extension
extensions/crypto-portfolio-tracker/README.md 4/5 Clear documentation outlining current features and future roadmap
extensions/crypto-portfolio-tracker/.prettierrc 3/5 Prettier configuration with incorrect singleQuote setting
extensions/crypto-portfolio-tracker/tsconfig.json 5/5 Standard TypeScript configuration following Raycast patterns
extensions/crypto-portfolio-tracker/.gitignore 5/5 Proper exclusion of dependencies and build artifacts
extensions/crypto-portfolio-tracker/eslint.config.js 5/5 Standard ESLint configuration using Raycast's preset

Confidence score: 3/5

  • This PR requires careful review due to the Prettier configuration issue and several technical concerns that could impact functionality
  • Score lowered due to incorrect Prettier configuration (singleQuote: false should be true per Raycast standards), potential precision issues with BigInt arithmetic, and missing error boundaries that could cause extension crashes
  • Pay close attention to extensions/crypto-portfolio-tracker/.prettierrc and the BigInt conversion logic in extensions/crypto-portfolio-tracker/src/api/ethereum.ts

16 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me

@raycastbot
raycastbot merged commit 792ccbd into raycast:main Nov 13, 2025
@github-actions

ghost commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Nov 13, 2025

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@narghev
narghev deleted the ext/crypto-portfolio-tracker branch November 13, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants