@lifi/widget 1.30.0 → 1.31.0
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/README.md +1 -1
- package/cjs/components/Header/WalletHeader.js +4 -2
- package/cjs/components/Header/WalletMenu.d.ts +1 -0
- package/cjs/components/{Menu.js → Header/WalletMenu.js} +8 -4
- package/cjs/config/theme.js +1 -1
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/i18n/en.json +2 -1
- package/cjs/i18n/it.json +88 -81
- package/cjs/i18n/uk.json +3 -1
- package/cjs/i18n/zh.json +83 -76
- package/cjs/utils/format.js +5 -4
- package/components/Header/WalletHeader.js +6 -4
- package/components/Header/WalletMenu.d.ts +1 -0
- package/components/{Menu.js → Header/WalletMenu.js} +7 -3
- package/config/theme.js +1 -1
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/i18n/en.json +2 -1
- package/i18n/it.json +88 -81
- package/i18n/uk.json +3 -1
- package/i18n/zh.json +83 -76
- package/package.json +7 -7
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/utils/format.js +5 -4
- package/cjs/components/Menu.d.ts +0 -1
- package/components/Menu.d.ts +0 -1
package/utils/format.js
CHANGED
|
@@ -49,8 +49,9 @@ export const formatAmount = (amount = '', returnInitial = false) => {
|
|
|
49
49
|
if (!amount) {
|
|
50
50
|
return amount;
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
|
|
52
|
+
const formattedAmount = amount.replaceAll(',', '.');
|
|
53
|
+
const parsedAmount = parseFloat(formattedAmount);
|
|
54
|
+
if (isNaN(Number(formattedAmount)) && !isNaN(parsedAmount)) {
|
|
54
55
|
return parsedAmount.toString();
|
|
55
56
|
}
|
|
56
57
|
if (isNaN(parsedAmount)) {
|
|
@@ -60,8 +61,8 @@ export const formatAmount = (amount = '', returnInitial = false) => {
|
|
|
60
61
|
return Math.abs(parsedAmount).toString();
|
|
61
62
|
}
|
|
62
63
|
try {
|
|
63
|
-
if (returnInitial && Big(
|
|
64
|
-
return
|
|
64
|
+
if (returnInitial && Big(formattedAmount)) {
|
|
65
|
+
return formattedAmount;
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
catch (_a) {
|
package/cjs/components/Menu.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Menu: import("@emotion/styled").StyledComponent<import("@mui/material").MenuProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
package/components/Menu.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Menu: import("@emotion/styled").StyledComponent<import("@mui/material").MenuProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|