MCPcopy Create free account
hub / github.com/B3Pay/B3Wallet / objectToString

Function objectToString

src/lib/utils.ts:43–59  ·  view source on GitHub ↗
(data: any)

Source from the content-addressed store, hash-verified

41}
42
43export const objectToString = (data: any) => {
44 return JSON.stringify(
45 data,
46 (name, value) => {
47 if (name === "Blob") {
48 return value.slice(0, 100) + "..."
49 }
50 switch (typeof value) {
51 case "bigint":
52 return value.toString()
53 default:
54 return value
55 }
56 },
57 2
58 )
59}
60
61export const getModuleHash = (
62 status: CanisterStatusResponse

Callers 2

DisplayDataFunction · 0.90
AppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected