Skip to content

feat: expanded test coverage for Solana, TRON, TON (58 tests)#190

Merged
BitHighlander merged 6 commits intomasterfrom
features/7.15-expanded-tests
Apr 4, 2026
Merged

feat: expanded test coverage for Solana, TRON, TON (58 tests)#190
BitHighlander merged 6 commits intomasterfrom
features/7.15-expanded-tests

Conversation

@BitHighlander
Copy link
Copy Markdown
Contributor

Summary

Expands integration test coverage from ~27 to 58 tests across Solana, TRON, and TON.

Solana (+11 tests -> 23 total):

  • 4 negative/rejection: malformed, truncated, trailing bytes, oversized
  • 2 multi-instruction: 2x transfer, transfer+memo
  • 1 token metadata: SolanaTokenInfo with USDC mint/symbol/decimals
  • 2 path edge cases: 3-element path, wrong coin type
  • 1 versioned v0: opaque tx requiring AdvancedMode

TRON (+6 tests -> 15 total):

  • 2 path edge cases: too short, wrong coin type (rejected by firmware)
  • 2 negative: empty raw_data, oversized raw_data
  • 1 determinism: same raw_data produces same signature
  • 1 different accounts: different keys produce different signatures

TON (+9 tests -> 20 total):

  • 2 path edge cases: too short (lenient), wrong coin type (rejected)
  • 2 negative: empty raw_tx, oversized raw_tx
  • 2 memo edge cases: empty memo, long memo (255 chars)
  • 2 workchain: explicit zero, default (verify match)
  • 1 different accounts: different keys produce different signatures

Also removes duplicate test_tron_show_address and test_ton_show_address methods.

Test Plan

  • All tests pass on firmware feat/solana-support (PR #206 ALL GREEN)
  • All tests pass on firmware feat/tron-ton-support (PR #207 ALL GREEN)
  • Test expectations corrected from CI findings (path validation behavior)

Solana (+11 tests → 23 total):
- 4 negative/rejection: malformed, truncated, trailing bytes, oversized
- 2 multi-instruction: 2x transfer, transfer+memo
- 1 token metadata: SolanaTokenInfo with USDC mint/symbol/decimals
- 2 path edge cases: 3-element path, wrong coin type
- 1 versioned v0: opaque tx requiring AdvancedMode
- 1 already existed: sign_message_blocked_without_advanced_mode

TRON (+6 tests → 15 total):
- 2 path edge cases: too short (2 levels), wrong coin type
- 2 negative: empty raw_data, oversized raw_data
- 1 determinism: same raw_data produces same signature
- 1 different accounts: different keys produce different signatures

TON (+9 tests → 20 total):
- 2 path edge cases: too short (2 levels), wrong coin type
- 2 negative: empty raw_tx, oversized raw_tx
- 2 memo edge cases: empty memo, long memo (255 chars)
- 2 workchain: explicit zero, default (verify match)
- 1 different accounts: different keys produce different signatures

Also: removed duplicate test_tron_show_address and test_ton_show_address
- test_ton_path_too_short: firmware is lenient (accepts 2-level path)
- test_ton_path_wrong_coin: firmware rejects wrong coin type (expect CallException)
- test_tron_path_wrong_coin: firmware rejects wrong coin type (expect CallException)
- test_tron_sign_deterministic: fix assertEqual arity (use assertTrue instead)
1. N5 method name: test_ton_sign_with_comment -> test_ton_sign_with_memo (JUnit match)
2. N4 description: remove false "hash verification" claim, describe actual behavior
3. S12: add token_info metadata test (SolanaTokenInfo with USDC mint/symbol)
4. TON section description: remove cell tree reconstruction claim (deferred to 7.15)
5. TON bullet points: CLEAR-SIGN -> STRUCTURED (accurate for current behavior)
6. S5 description: add AdvancedMode requirement note
7. T4 description: clarify blind sign shows amount+address if provided
@BitHighlander BitHighlander merged commit a6c6602 into master Apr 4, 2026
4 checks passed
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.

2 participants