Skip to content

Commit 8346d55

Browse files
dongowuclaude
andcommitted
fix: critical bugs, type corrections, RTDS race condition, and comprehensive test coverage
- Fix UpdateBalanceAllowance response not being unmarshaled (pkg/clob) - Fix SignatureType enum collision: SignatureMagic and SignatureProxy both had value 1 (pkg/auth) - Fix salt validation inconsistency: generation limited to 53 bits but validation allowed 63 bits (pkg/clob) - Fix PriceHistoryPoint.Price type from string to float64 to match API response (pkg/clob/clobtypes) - Fix RTDS subscribe race condition: subscribeRaw now waits for WebSocket connection before sending - Add comprehensive tests for pkg/data (9.4% → 63.8%), pkg/ctf (11.6% → 71.1%), pkg/clob/ws (33.8% → 63.6%), pkg/rtds (35.0% → 62.1%), pkg/clob/rfq (38.5% → 100%), pkg/bridge (42.0% → 67.0%) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 93c7db8 commit 8346d55

15 files changed

Lines changed: 3835 additions & 87 deletions

pkg/auth/auth.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ type SignatureType int
7171

7272
const (
7373
// SignatureEOA indicates a standard Externally Owned Account (EOA).
74-
SignatureEOA SignatureType = iota
75-
// SignatureMagic indicates a signature from a Magic.link wallet.
76-
SignatureMagic
74+
SignatureEOA SignatureType = 0
7775
// SignatureProxy indicates a signature from a Polymarket Proxy wallet.
76+
// Magic.link wallets use the same proxy factory, so SignatureProxy covers both.
7877
SignatureProxy SignatureType = 1
7978
// SignatureGnosisSafe indicates a signature from a Gnosis Safe multisig.
8079
SignatureGnosisSafe SignatureType = 2

0 commit comments

Comments
 (0)