hotfix: fixed loading non perps accounts

This commit is contained in:
Linkie Link 2024-02-09 09:08:11 +01:00
parent 413f8c43c8
commit 8283097262
No known key found for this signature in database
GPG Key ID: 5318B0F2564D38EA

View File

@ -108,7 +108,7 @@ export function resolvePerpsPositions(
perpPositions: Positions['perps'],
prices: BNCoin[],
): PerpsPosition[] {
if (!perpPositions.length) return []
if (!perpPositions || !perpPositions.length) return []
const basePrice =
prices.find((price) => price.denom === perpPositions[0].base_denom)?.amount ?? BN_ZERO