Force-refresh header balances after transfers and balance SSE events.
Invalidate balance caches on mutation, push SSE balance tick, and bypass 60s cache when refreshing funds. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1811,11 +1811,11 @@ function applyAccountSnapshot(data){
|
||||
}
|
||||
if(data.options_funding_usdc != null || data.options_funding_usdt != null){
|
||||
const optFunding = formatOptionsFundingLabel(data.options_funding_usdc, data.options_funding_usdt);
|
||||
if(optFunding !== "—") setFundsFieldText("options-funding-usdc", optFunding);
|
||||
setFundsFieldText("options-funding-usdc", optFunding);
|
||||
}
|
||||
if(data.options_trading_usdc != null || data.options_trading_usdt != null){
|
||||
const optTrading = formatOptionsFundingLabel(data.options_trading_usdc, data.options_trading_usdt);
|
||||
if(optTrading !== "—") setFundsFieldText("options-trading-usdc", optTrading);
|
||||
setFundsFieldText("options-trading-usdc", optTrading);
|
||||
}
|
||||
if(typeof data.unrealized_pnl !== "undefined"){
|
||||
updateRealtimePnl(data.unrealized_pnl);
|
||||
|
||||
Reference in New Issue
Block a user