MCPcopy Create free account
hub / github.com/dailydotdev/apps / updateLocalBootData

Function updateLocalBootData

packages/shared/src/contexts/BootProvider.tsx:87–113  ·  view source on GitHub ↗
(
  current: Partial<BootCacheData> | undefined,
  boot: Partial<BootCacheData>,
)

Source from the content-addressed store, hash-verified

85};
86
87const updateLocalBootData = (
88 current: Partial<BootCacheData> | undefined,
89 boot: Partial<BootCacheData>,
90) => {
91 const localData = { ...current, ...boot, lastModifier: 'extension' };
92 if (localData.exp) {
93 const { f, ...exp } = localData.exp;
94 localData.exp = exp;
95 }
96 const result = filteredProps(localData, [
97 'alerts',
98 'settings',
99 'notifications',
100 'user',
101 'lastModifier',
102 'squads',
103 'exp',
104 'feeds',
105 'geo',
106 'isAndroidApp',
107 'accessTokenExpiresIn',
108 ]);
109
110 storage.setItem(BOOT_LOCAL_KEY, JSON.stringify(result));
111
112 return result;
113};
114
115const getCachedOrNull = () => {
116 try {

Callers 1

BootDataProviderFunction · 0.85

Calls 1

filteredPropsFunction · 0.85

Tested by

no test coverage detected