mars-v2-frontend/src/utils/checkAutoLendEnabled.ts

9 lines
367 B
TypeScript
Raw Normal View History

2023-10-23 12:04:17 +00:00
import { LocalStorageKeys } from 'constants/localStorageKeys'
export default function checkAutoLendEnabled(accountId: string) {
2023-10-23 12:04:17 +00:00
const storageItem = localStorage.getItem(LocalStorageKeys.AUTO_LEND_ENABLED_ACCOUNT_IDS)
const autoLendEnabledAccountIds: string[] = storageItem ? JSON.parse(storageItem) : []
return autoLendEnabledAccountIds.includes(accountId)
}