@@ -2,10 +2,10 @@ import { useMemo, useState } from 'react';
2
2
import { DeepPartial , TAdvertiserStats } from 'types' ;
3
3
import { AvailableP2PBalanceModal } from '@/components/Modals' ;
4
4
import { api } from '@/hooks' ;
5
- import { numberToCurrencyText } from '@/utils' ;
6
5
import { LabelPairedCircleInfoMdRegularIcon } from '@deriv/quill-icons' ;
7
6
import { Localize } from '@deriv-com/translations' ;
8
7
import { Text , useDevice } from '@deriv-com/ui' ;
8
+ import { FormatUtils } from '@deriv-com/utils' ;
9
9
import { ProfileDailyLimit } from '../ProfileDailyLimit' ;
10
10
import './ProfileBalance.scss' ;
11
11
@@ -18,13 +18,13 @@ const ProfileBalance = ({ advertiserStats }: { advertiserStats: DeepPartial<TAdv
18
18
const dailyLimits = useMemo (
19
19
( ) => [
20
20
{
21
- available : `${ numberToCurrencyText ( advertiserStats ?. dailyAvailableBuyLimit || 0 ) } ${ currency } ` ,
22
- dailyLimit : `${ advertiserStats ?. daily_buy_limit || numberToCurrencyText ( 0 ) } ${ currency } ` ,
21
+ available : `${ FormatUtils . formatMoney ( advertiserStats ?. dailyAvailableBuyLimit || 0 ) } ${ currency } ` ,
22
+ dailyLimit : `${ advertiserStats ?. daily_buy_limit || FormatUtils . formatMoney ( 0 ) } ${ currency } ` ,
23
23
type : 'Buy' ,
24
24
} ,
25
25
{
26
- available : `${ numberToCurrencyText ( advertiserStats ?. dailyAvailableSellLimit || 0 ) } ${ currency } ` ,
27
- dailyLimit : `${ advertiserStats ?. daily_sell_limit || numberToCurrencyText ( 0 ) } ${ currency } ` ,
26
+ available : `${ FormatUtils . formatMoney ( advertiserStats ?. dailyAvailableSellLimit || 0 ) } ${ currency } ` ,
27
+ dailyLimit : `${ advertiserStats ?. daily_sell_limit || FormatUtils . formatMoney ( 0 ) } ${ currency } ` ,
28
28
type : 'Sell' ,
29
29
} ,
30
30
] ,
@@ -58,7 +58,7 @@ const ProfileBalance = ({ advertiserStats }: { advertiserStats: DeepPartial<TAdv
58
58
/>
59
59
</ div >
60
60
< Text size = { isMobile ? '2xl' : 'xl' } weight = 'bold' >
61
- { numberToCurrencyText ( advertiserStats ?. balance_available || 0 ) } USD
61
+ { FormatUtils . formatMoney ( advertiserStats ?. balance_available || 0 ) } USD
62
62
</ Text >
63
63
</ div >
64
64
< div className = 'flex flex-col gap-[1.6rem]' >
0 commit comments