Skip to content

Fix /supported-cryptocurrencies endpoint#744

Merged
Sharqiewicz merged 11 commits into
stagingfrom
fix/supported-cryptocurrencies-bad-token-handling
Jul 7, 2025
Merged

Fix /supported-cryptocurrencies endpoint#744
Sharqiewicz merged 11 commits into
stagingfrom
fix/supported-cryptocurrencies-bad-token-handling

Conversation

@Sharqiewicz
Copy link
Copy Markdown
Member

This pull request introduces updates to cryptocurrency mappings, token configurations, and asset icons across multiple files to improve token handling and compatibility. Key changes include adjustments to token mappings, addition of new token configurations, and updates to asset icon imports and usage.

Cryptocurrency Mapping Updates:

Token Configuration Enhancements:

Asset Icon Updates:

Frontend Token Display Adjustments:

Type Definition Simplifications:

@Sharqiewicz Sharqiewicz requested a review from Copilot July 4, 2025 12:59
@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 4, 2025

Deploy Preview for pendulum-pay ready!

Name Link
🔨 Latest commit 2c57e75
🔍 Latest deploy log https://app.netlify.com/projects/pendulum-pay/deploys/686a88d19f634b0008f6ea21
😎 Deploy Preview https://deploy-preview-744--pendulum-pay.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances token support by updating backend mappings, extending EVM token configurations, and aligning frontend asset icons and displays.

  • Adjusted cryptocurrency mapping logic and simplified the SupportedCryptocurrency type.
  • Added USDCE token configurations for both Arbitrum and Avalanche networks.
  • Updated frontend to import ETH icon, switch EURC to SVG, and refresh the PopularTokens list (adding ETH, replacing EURC with EUR).

Reviewed Changes

Copilot reviewed 6 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/api/src/api/services/alchemypay/utils.ts Updated CRYPTO_MAP to include eth and replaced "usdc.e" key.
packages/shared/src/endpoints/supported-cryptocurrencies.endpoints.ts Removed unused import and aliased SupportedCryptocurrency to OnChainToken.
packages/shared/src/tokens/evm/config.ts Added USDCE token entries under Arbitrum and Avalanche networks.
apps/frontend/src/hooks/useGetAssetIcon.tsx Imported new ETH icon, upgraded EURC import to SVG, and added eth mapping.
apps/frontend/src/sections/PopularTokens/index.tsx Added ETH to popular tokens and replaced EURC with EUR.
Comments suppressed due to low confidence (3)

apps/frontend/src/sections/PopularTokens/index.tsx:16

  • The token name 'BRLA' looks inconsistent with the asset icon key 'brl' and the standard currency code. Consider renaming it to 'BRL' for clarity.
  { assetIcon: "brl", name: "BRLA" },

packages/shared/src/tokens/evm/config.ts:118

  • No unit test covers the new USDCE configuration for Arbitrum. Consider adding a test to verify mapEvmTokenToDetails returns the expected details for USDCE on Arbitrum.
    [EvmToken.USDCE]: {

packages/shared/src/tokens/evm/config.ts:202

  • Similarly, add a unit test to confirm USDCE is correctly configured and returned for the Avalanche network.
    [EvmToken.USDCE]: {

Copy link
Copy Markdown
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

Didn't test it but looks good to me overall 👍
The deploy preview fails though. Seems like one of the icons is mising or has a wrong name.

@Sharqiewicz Sharqiewicz merged commit 6bcd840 into staging Jul 7, 2025
5 checks passed
@ebma ebma deleted the fix/supported-cryptocurrencies-bad-token-handling branch July 7, 2025 15:28
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.

3 participants