update market position faster for perp accounts
This commit is contained in:
parent
5aaf079122
commit
6820ac854f
|
@ -96,11 +96,10 @@ export default function MarketPosition() {
|
|||
return getMarketIndexBySymbol(mangoGroupConfig, baseSymbol)
|
||||
}, [mangoGroupConfig, baseSymbol])
|
||||
|
||||
const perpAccount = useMemo(() => {
|
||||
if (marketName.includes('PERP') && mangoAccount) {
|
||||
return mangoAccount.perpAccounts[marketIndex]
|
||||
}
|
||||
}, [marketName, mangoAccount, marketIndex])
|
||||
let perpAccount
|
||||
if (marketName.includes('PERP') && mangoAccount) {
|
||||
perpAccount = mangoAccount.perpAccounts[marketIndex]
|
||||
}
|
||||
|
||||
const handleSizeClick = (size) => {
|
||||
setMangoStore((state) => {
|
||||
|
|
Loading…
Reference in New Issue