File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
suite-native/transaction-management/src/components/fees Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export const CustomFeeInputs = ({ symbol }: CustomFeeInputsProps) => {
7070 name = { feePerUnitFieldName }
7171 testID = { `@transactionManagement/${ feePerUnitFieldName } -input` }
7272 accessibilityLabel = "address input"
73- keyboardType = " number-pad"
73+ keyboardType = { networkType === 'bitcoin' ? 'decimal-pad' : ' number-pad' }
7474 rightIcon = { < Text color = "textSubdued" > { feeUnits } </ Text > }
7575 onChangeText = { handleFieldChangeValue ( feePerUnitFieldName , cryptoAmountTransformer ) }
7676 />
Original file line number Diff line number Diff line change @@ -62,20 +62,20 @@ const valuesWrapperStyle = prepareNativeStyle(utils => ({
6262const getFeePerUnit = ( {
6363 networkType,
6464 feeLevel,
65- transactionBytes,
6665 backendFeePerUnit = '0' ,
6766} : {
6867 networkType : NetworkType ;
6968 feeLevel : GeneralPrecomposedTransaction ;
70- transactionBytes : number ;
7169 backendFeePerUnit : string ;
7270} ) : string => {
7371 if ( ! isFinalPrecomposedTransaction ( feeLevel ) ) {
7472 return backendFeePerUnit ;
7573 }
7674
7775 if ( networkType === 'bitcoin' ) {
78- return String ( Math . round ( Number ( feeLevel . fee ) / transactionBytes ) ) ;
76+ return Number . isInteger ( Number ( feeLevel . feePerByte ) )
77+ ? feeLevel . feePerByte
78+ : Number ( feeLevel . feePerByte ) . toFixed ( 2 ) ;
7979 }
8080
8181 return feeLevel . feePerByte ;
@@ -138,7 +138,6 @@ export const FeeOption = ({
138138 const feePerUnit = getFeePerUnit ( {
139139 networkType,
140140 feeLevel,
141- transactionBytes,
142141 backendFeePerUnit : backendFeePerUnit ?? '0' ,
143142 } ) ;
144143
You can’t perform that action at this time.
0 commit comments