MCPcopy Create free account
hub / github.com/CommE2E/comm / resolveToString

Function resolveToString

lib/shared/notif-utils.js:246–262  ·  view source on GitHub ↗
(
    entityText: string | EntityText,
  )

Source from the content-addressed store, hash-verified

244 }
245
246 const resolveToString = async (
247 entityText: string | EntityText,
248 ): Promise<string> => {
249 if (typeof entityText === 'string') {
250 return entityText;
251 }
252 const notifString = await getEntityTextAsString(
253 entityText,
254 { getENSNames, getFCNames },
255 { prefixThisThreadNounWith: 'your' },
256 );
257 invariant(
258 notifString !== null && notifString !== undefined,
259 'getEntityTextAsString only returns falsey when passed falsey',
260 );
261 return notifString;
262 };
263 let promises = {
264 merged: resolveToString(unresolvedNotifTexts.merged),
265 body: resolveToString(unresolvedNotifTexts.body),

Callers 1

Calls 1

getEntityTextAsStringFunction · 0.90

Tested by

no test coverage detected