@funkit/utils
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -223,3 +223,3 @@ // src/utils/address.ts | ||
const finalDecimal = Math.max(Math.min(maxDecimal, decimalPlaces), 2); | ||
return percent.toFixed(finalDecimal) + "%"; | ||
return `${percent.toFixed(finalDecimal)}%`; | ||
} | ||
@@ -324,6 +324,6 @@ function formatCryptoAndStringify(amount, platform = "", useCurrencyAbbreviation = true, options) { | ||
function formatDynamicFeeUsd(fee, total, options = {}) { | ||
const { percentThreshold = 2.5 } = options; | ||
if (fee < 0.01) { | ||
return `<${formatCurrencyAndStringify(0.01)}`; | ||
} | ||
const { percentThreshold = 2.5 } = options; | ||
if (percentThreshold !== null && fee > percentThreshold) { | ||
@@ -334,8 +334,2 @@ return formatPercent(fee / total * 100); | ||
} | ||
function formatDynamicFeeToken(fee, symbol) { | ||
if (fee < 1e-5) { | ||
return `<${formatCryptoAndStringify(1e-5, symbol)}`; | ||
} | ||
return formatCryptoAndStringify(fee, symbol); | ||
} | ||
@@ -525,3 +519,2 @@ // src/utils/formatTimestamp.ts | ||
formatCurrencyAndStringify, | ||
formatDynamicFeeToken, | ||
formatDynamicFeeUsd, | ||
@@ -528,0 +521,0 @@ formatNumberAndStringify, |
{ | ||
"name": "@funkit/utils", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Funkit Utils SDK centralizes all utilities & consts for usage across all funkit apps and packages.", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
1092
0
53848
546
3
0