Skip to content

Commit a0b396e

Browse files
Fixed toast amount not showing (#234)
* Fix toast amount not showing * Update CHANGELOG * Update CHANGELOG.md * Fixed processing * const
1 parent 36c9196 commit a0b396e

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [[0.0.33](https://github.com/multiversx/mx-sdk-dapp-ui/pull/235)] - 2025-09-29
11+
12+
- [Fixed toast large amount not showing](https://github.com/multiversx/mx-sdk-dapp-ui/pull/234)
1013
- [Removed passkey components](https://github.com/multiversx/mx-sdk-dapp-ui/pull/233)
1114
- [Display provider name in advanced signing](https://github.com/multiversx/mx-sdk-dapp-ui/pull/232)
1215

src/components/functional/toasts-list/helpers/getAmountParts/getAmountParts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const getAmountParts = (amount = '') => {
55

66
const [value, label = ''] = amount.split(' ');
77

8-
if (isNaN(Number(value))) {
8+
if (isNaN(Number(value?.replace(',', '')))) {
99
return { amountInteger: '', amountDecimal: '', label };
1010
}
1111

src/components/functional/toasts-list/helpers/getAmountParts/tests/getAmountParts.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,13 @@ describe('getAmountParts', () => {
6363
label: 'xEGLD',
6464
});
6565
});
66+
67+
it('should return correct amount when amount is a correct string with separation dot and negative sign', () => {
68+
const amountParts = getAmountParts('-1,000 xEGLD');
69+
expect(amountParts).toEqual({
70+
amountInteger: '-1,000',
71+
amountDecimal: '',
72+
label: 'xEGLD',
73+
});
74+
});
6675
});

0 commit comments

Comments
 (0)