File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
apps/browser-extension-wallet/src/views/bitcoin-mode/features/send/components Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { Bitcoin } from '@lace/bitcoin';
10
10
import { useTranslation } from 'react-i18next' ;
11
11
12
12
const SATS_IN_BTC = 100_000_000 ;
13
+ const MAXIMUM_FEE_DECIMAL = 8 ;
13
14
14
15
interface ReviewTransactionProps {
15
16
unsignedTransaction : Bitcoin . UnsignedTransaction ;
@@ -98,7 +99,12 @@ export const ReviewTransaction: React.FC<ReviewTransactionProps> = ({
98
99
} ) }
99
100
< Flex flexDirection = "column" w = "$fill" alignItems = "flex-end" gap = "$4" >
100
101
< Text . Body . Normal weight = "$medium" data-testid = "output-summary-fee" >
101
- { Number . parseFloat ( ( Number ( feeInBtc ) / SATS_IN_BTC ) . toFixed ( 8 ) ) } BTC
102
+ { ( Number ( feeInBtc ) / SATS_IN_BTC ) . toLocaleString ( 'en-US' , {
103
+ minimumFractionDigits : 0 ,
104
+ maximumFractionDigits : MAXIMUM_FEE_DECIMAL ,
105
+ useGrouping : false
106
+ } ) } { ' ' }
107
+ BTC
102
108
</ Text . Body . Normal >
103
109
< Text . Body . Normal weight = "$medium" data-testid = "output-summary-fee-rate" className = { styles . feeRateLabel } >
104
110
{ ( ( feeRate * SATS_IN_BTC ) / 1000 ) . toFixed ( 2 ) } sats/vB
You can’t perform that action at this time.
0 commit comments