UNPKG

@ledgerhq/live-common

Version:
17 lines 672 B
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig"; import { legacyCryptoAssetsStore } from "@ledgerhq/cryptoassets/tokens"; let cryptoAssetsStore = undefined; export function setCryptoAssetsStore(store) { cryptoAssetsStore = store; } export function getCryptoAssetsStore() { const featureEnabled = LiveConfig.isConfigSet() && LiveConfig.getValueByKey("feature_cal_lazy_loading"); if (!featureEnabled) { return legacyCryptoAssetsStore; } if (!cryptoAssetsStore) { throw new Error("CryptoAssetsStore is not set. Please call setCryptoAssetsStore first."); } return cryptoAssetsStore; } //# sourceMappingURL=index.js.map