fix some bugs
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { setCachedMainMetal } from '@/utils/metalLabels'
|
||||
|
||||
export function getConfigApp(key: string) {
|
||||
const config = window.__APP_CONFIG__ ? window.__APP_CONFIG__.user : {}
|
||||
|
||||
@@ -29,11 +31,14 @@ async function bootstrapSettingsFromApi(): Promise<void> {
|
||||
const list = Array.isArray(rows) ? rows : []
|
||||
const isStoreRow = list.find((item) => item.key === 'is_store')
|
||||
const mainWalletRow = list.find((item) => item.key === 'main_wallet_products')
|
||||
const mainMetalRow = list.find((item) => item.key === 'main_metal')
|
||||
storeModeFromSettings = isStoreRow ? isSwitchOn(isStoreRow.value) : false
|
||||
setCachedMainMetal(mainMetalRow?.value)
|
||||
const { setCachedMainWalletProductIds } = await import('@/components/mobile/utils/wallet')
|
||||
setCachedMainWalletProductIds(parseMainWalletProductIds(mainWalletRow?.value))
|
||||
} catch {
|
||||
storeModeFromSettings = false
|
||||
setCachedMainMetal(null)
|
||||
const { setCachedMainWalletProductIds } = await import('@/components/mobile/utils/wallet')
|
||||
setCachedMainWalletProductIds([])
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user