Skip to content

Commit 69466db

Browse files
Merge pull request #1725 from multiversx/development
5.6.18
2 parents c92503b + 39eb0d2 commit 69466db

4 files changed

Lines changed: 25 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
## [[5.6.16](https://github.com/multiversx/mx-sdk-dapp/pull/1724)] - 2026-02-25
10+
## [[5.6.19](https://github.com/multiversx/mx-sdk-dapp/pull/1725)] - 2026-02-27
11+
12+
- [Update sdk-dapp-ui](https://github.com/multiversx/mx-sdk-dapp/pull/1725)
13+
14+
## [[5.6.17](https://github.com/multiversx/mx-sdk-dapp/pull/1724)] - 2026-02-25
1115

1216
- [Update sdk-dapp-ui](https://github.com/multiversx/mx-sdk-dapp/pull/1724)
1317

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@multiversx/sdk-dapp",
3-
"version": "5.6.17",
3+
"version": "5.6.19",
44
"description": "A library to hold the main logic for a dapp on the MultiversX blockchain",
55
"author": "MultiversX",
66
"license": "MIT",

src/controllers/FormatAmountController/FormatAmountController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class FormatAmountController {
1717
}
1818

1919
const formattedAmount = formatAmount(props);
20-
const isValid = stringIsFloat(formattedAmount);
20+
const isValid = stringIsFloat(formattedAmount.replaceAll(',', ''));
2121
const [valueInteger, valueDecimal] = formattedAmount.split('.');
2222

2323
return {

src/controllers/FormatAmountController/tests/formatAmountController.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,22 @@ describe('FormatAmountController', () => {
102102
valueDecimal: '.00'
103103
});
104104
});
105+
106+
it('handles addCommas param', () => {
107+
const result = FormatAmountController.getData({
108+
digits: 2,
109+
decimals: 18,
110+
showLastNonZeroDecimal: false,
111+
addCommas: true,
112+
egldLabel: 'xEGLD',
113+
input: '31455417380321253900800'
114+
});
115+
116+
expect(result).toEqual({
117+
isValid: true,
118+
label: ' xEGLD',
119+
valueInteger: '31,455',
120+
valueDecimal: '.41'
121+
});
122+
});
105123
});

0 commit comments

Comments
 (0)