fix: independent token source lookups #19
Reference in New Issue
Block a user
Delete Branch "feat/token-message-rich"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Test Plan
Codex review results for PR #19.
FAIL
collectRichTokenDataregresses existing symbol resolution by hardcoding both lookups totoken + "USDT"ininternal/services/tele/commands/token.go:78and:88.That bypasses the existing resolver logic in
internal/helper/binancex/symbol.goand the future-to-spot mapping inFuture2SpotSymbol(...).The repo already supports prefixed futures (
1000,1M),USDCshorthand (c), and mapped contracts likeLUNA2USDT -> LUNAUSDT. Those cases can still enter the handler throughbinancex.IsToken(...), but the new collector now probes only<TOKEN>USDT, so supported aliases/mapped contracts can lose future data, spot data, or both.Validation:
git fetch origingit worktree add ../.worktree/pr-19 origin/feat/token-message-richenv GOCACHE=/tmp/go-build-pr19 go test ./internal/services/tele/commands -run CollectRichTokenData -v -count=1env GOCACHE=/tmp/go-build-pr19 go test ./internal/services/tele/view -run RenderRichTokenMessage -v -count=1env GOCACHE=/tmp/go-build-pr19 go test ./... -count=1env GOCACHE=/tmp/go-build-pr19 go vet ./...Test gap:
ABCUSDT/ETHUSDTpaths only; they do not cover the existing alias/prefix/mapping behavior that this change now bypasses.[codex] scope clarification for PR #19.
The concern from my previous review comment is about spot/future symbol resolution only. It is not about the new Alpha lookup itself.
More specifically, the follow-up concern is that the new independent collector now probes spot/future as
<TOKEN>USDTdirectly, which can bypass the existing spot/future resolver rules for prefixes, aliases, and future->spot mappings.I split that concern into a separate issue so it can be handled independently from Alpha lookup changes:
So to be explicit: