hedgequantx 2.9.184 → 2.9.185
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/services/session.js +9 -3
package/package.json
CHANGED
package/src/services/session.js
CHANGED
|
@@ -112,12 +112,18 @@ const connections = {
|
|
|
112
112
|
},
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
* Sanitize account data
|
|
115
|
+
* Sanitize account data for caching
|
|
116
|
+
* IMPORTANT: Keep rithmicAccountId for PnL lookups
|
|
116
117
|
*/
|
|
117
118
|
_sanitizeAccount(acc) {
|
|
118
|
-
if (!acc || typeof acc !== 'object'
|
|
119
|
+
if (!acc || typeof acc !== 'object') return null;
|
|
120
|
+
|
|
121
|
+
// Get the real Rithmic account ID (text like "APEX-130042-63")
|
|
122
|
+
const rithmicId = acc.rithmicAccountId || acc.accountId;
|
|
123
|
+
if (!rithmicId) return null;
|
|
124
|
+
|
|
119
125
|
return {
|
|
120
|
-
accountId:
|
|
126
|
+
accountId: rithmicId, // Use the real Rithmic ID, not the hash
|
|
121
127
|
fcmId: acc.fcmId ? String(acc.fcmId) : undefined,
|
|
122
128
|
ibId: acc.ibId ? String(acc.ibId) : undefined,
|
|
123
129
|
accountName: acc.accountName ? String(acc.accountName) : undefined,
|