@rabbitio/ui-kit 1.0.0-beta.29 → 1.0.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +13 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +13 -2
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +13 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/common/amountUtils.js +12 -1
package/dist/index.modern.js
CHANGED
|
@@ -1744,6 +1744,15 @@ class AmountUtils {
|
|
|
1744
1744
|
limitTotalLength: false
|
|
1745
1745
|
});
|
|
1746
1746
|
}
|
|
1747
|
+
static cryptoFullPureNumber(amount, digits) {
|
|
1748
|
+
return this.crypto(amount, null, digits, {
|
|
1749
|
+
ticker: false,
|
|
1750
|
+
collapsible: false,
|
|
1751
|
+
trim: false,
|
|
1752
|
+
limitTotalLength: false,
|
|
1753
|
+
numberPartsSeparator: false
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1747
1756
|
|
|
1748
1757
|
/**
|
|
1749
1758
|
* Universal method for rendering of crypto amounts, taking into account the rules of
|
|
@@ -1786,7 +1795,7 @@ class AmountUtils {
|
|
|
1786
1795
|
// Collapse the 1M+ amounts if applicable
|
|
1787
1796
|
processedAmount = this._collapseToMillionsAndFormat(BigNumber(processedAmount), this.collapsedDecimalCount, params);
|
|
1788
1797
|
wereMillionsCollapsed = true;
|
|
1789
|
-
} else {
|
|
1798
|
+
} else if (params.numberPartsSeparator) {
|
|
1790
1799
|
// Add separators to integer part of the amount
|
|
1791
1800
|
processedAmount = BigNumber(processedAmount).toFormat();
|
|
1792
1801
|
}
|
|
@@ -1971,7 +1980,9 @@ AmountUtils.defaultCryptoParams = {
|
|
|
1971
1980
|
// Limits the total amount length to maxTotalLength
|
|
1972
1981
|
extraSmallLength: false,
|
|
1973
1982
|
// Limits the total amount length to extraSmallMaxTotalLength
|
|
1974
|
-
periods: true
|
|
1983
|
+
periods: true,
|
|
1984
|
+
// Whether we add periods ("..") as suffix for trimmed numbers
|
|
1985
|
+
numberPartsSeparator: true // Whether we add separators e.g. for 1000000 -> 1,000,000
|
|
1975
1986
|
};
|
|
1976
1987
|
|
|
1977
1988
|
class Blockchain {
|