MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / note

Function note

ses.cjs:1735–1754  ·  view source on GitHub ↗
(error, detailsNote)

Source from the content-addressed store, hash-verified

1733
1734/** @type {AssertNote} */
1735const note= (error, detailsNote)=> {
1736 if( typeof detailsNote=== 'string') {
1737 // If it is a string, use it as the literal part of the template so
1738 // it doesn't get quoted.
1739 detailsNote= redactedDetails([detailsNote]);
1740 }
1741 const hiddenDetails= weakmapGet(hiddenDetailsMap, detailsNote);
1742 if( hiddenDetails=== undefined) {
1743 throw TypeError( `unrecognized details ${quote(detailsNote)}`);
1744 }
1745 const logArgs= getLogArgs(hiddenDetails);
1746 const callbacks= weakmapGet(hiddenNoteCallbackArrays, error);
1747 if( callbacks!== undefined) {
1748 for( const callback of callbacks) {
1749 callback(error, logArgs);
1750 }
1751 }else {
1752 addLogArgs(error, logArgs);
1753 }
1754 };
1755freeze(note);
1756
1757/**

Callers

nothing calls this directly

Calls 4

redactedDetailsFunction · 0.85
quoteFunction · 0.85
getLogArgsFunction · 0.85
addLogArgsFunction · 0.85

Tested by

no test coverage detected