MCPcopy Create free account
hub / github.com/Modulus-Labs/RockyBot / roundNumber

Function roundNumber

front-end/src/util/utils.ts:12–14  ·  view source on GitHub ↗
(num: number, decimals: number = 2)

Source from the content-addressed store, hash-verified

10} from '../constants';
11
12export const roundNumber = (num: number, decimals: number = 2): number => {
13 return Math.round(Math.pow(10, decimals) * num) / Math.pow(10, decimals);
14}
15
16export const truncateAddr = (addr: string, length: number = 10): string => {
17 if (addr.substring(addr.length - 3) === "eth") {

Callers 3

loadActionDataFunction · 0.90
loadNetWorthFunction · 0.90
AppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected