Skip to content

follow-up to #365: detect() doc caveat, Solana 0x end-to-end test, tron hex workspace dep #374

Description

Three nits from the PR #365 review (prasanna-anchorage) that didn't block approval but are worth a follow-up.

1. detect() doc comment — best-effort classification caveat

SupportedEncodings::detect() is now the single routing point for hex vs. Base64. The current doc notes the 0x/0X stripping but doesn't call out that classification is heuristic: a Base64 string whose body is all ASCII hex digits of even length will misclassify as Hex. The consequence is a downstream decode error (not a silent mis-parse), but callers deserve the heads-up. Add one line to the doc comment.

File: src/visualsign/src/encodings.rsdetect() doc

2. End-to-end SolanaTransactionWrapper::from_string test with 0x prefix

The headline behavioral fix in #365 for Solana is that a 0x-prefixed hex transaction now decodes instead of failing. This path is covered at the helper level (encodings.rs unit tests) but not at the from_string level. A single from_string("0x<valid hex tx>") assertion would pin the behavior so a future detect() refactor can't silently re-break it.

File: src/chain_parsers/visualsign-solana/src/core/visualsign.rs — test module

3. Align visualsign-tron hex dep to { workspace = true }

visualsign-tron/Cargo.toml still pins hex = "0.4.3" directly; the workspace root also defines hex = "0.4.3". Solana was already moved to { workspace = true } in #365. Aligning tron is a one-line consistency fix with no version change.

File: src/chain_parsers/visualsign-tron/Cargo.toml:17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions