Skip to content

feat: detect chain network from address format - #26

Closed
salazarsebas wants to merge 1 commit into
mainfrom
feat/detect-address-network
Closed

salazarsebas wants to merge 1 commit into
mainfrom
feat/detect-address-network

Conversation

@salazarsebas

Copy link
Copy Markdown
Contributor

Summary

Implements issue #10. apps/web no longer hardcodes network: \"tron\" for every destination.

parseDestinationAddress lives in packages/core (the UI must not own this rule). It infers Tron from a 34-character T... base58 address and Ethereum from 0x plus 40 hex characters. Anything else is rejected instead of being stored under the wrong network:value risk-list key.

The send form shows a field-level error for unrecognized input and surfaces the detected network on the assessment so a Tron vs Ethereum paste is visible.

Test plan

  • pnpm --filter @custos/core test (includes 5 new parse tests)
  • pnpm run build
  • pnpm run typecheck
  • pnpm --filter @custos/web build
  • Paste a T... address and confirm the result says Tron
  • Paste a 0x... address and confirm Ethereum
  • Paste bc1... or a short 0x and confirm the form errors without analyzing

Closes #10

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b4807fda-0bf5-4c51-b2ed-29d9c91857a6


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@salazarsebas

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #24 (Josue19-08), which already implements this issue and was opened first. Sorry for the double work.

#27 was stacked on this branch. It should be retargeted onto main or onto fix/issue-10-detect-chain-network after #24 lands.

@salazarsebas

Copy link
Copy Markdown
Contributor Author

Duplicate of #24.

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.

Detect chain network from address format instead of hardcoding tron

1 participant