diff --git a/packages/core-mobile/app/components/EditFees.tsx b/packages/core-mobile/app/components/EditFees.tsx index 17ec1d7956..c5ba31d162 100644 --- a/packages/core-mobile/app/components/EditFees.tsx +++ b/packages/core-mobile/app/components/EditFees.tsx @@ -144,7 +144,7 @@ const EditFees = ({ } } - const saveDisabled = !!feeError || newFees.gasLimit === 0 + const saveDisabled = !!feeError || (newFees.gasLimit === 0 && !isBtcNetwork) const sanitized = (text: string): string => text.replace(/[^0-9]/g, '') diff --git a/packages/core-mobile/app/components/NetworkFeeSelector.tsx b/packages/core-mobile/app/components/NetworkFeeSelector.tsx index 4bce9adfc1..cebc802fef 100644 --- a/packages/core-mobile/app/components/NetworkFeeSelector.tsx +++ b/packages/core-mobile/app/components/NetworkFeeSelector.tsx @@ -101,7 +101,7 @@ const NetworkFeeSelector = ({ // customFees init value. // NetworkFee is not immediately available hence the useEffect useEffect(() => { - if (!customFees && networkFee && gasLimit > 0) { + if (!customFees && networkFee && (gasLimit > 0 || isBtcNetwork)) { const initialCustomFees = getInitialCustomFees(networkFee) setCustomFees(initialCustomFees) setCalculatedFees(initialCustomFees) @@ -112,6 +112,7 @@ const NetworkFeeSelector = ({ customFees, gasLimit, getInitialCustomFees, + isBtcNetwork, nativeTokenPrice, networkFee, onFeesChange, diff --git a/packages/core-mobile/app/screens/send/ReviewSend.tsx b/packages/core-mobile/app/screens/send/ReviewSend.tsx index 5b045a5b73..c9f17865ee 100644 --- a/packages/core-mobile/app/screens/send/ReviewSend.tsx +++ b/packages/core-mobile/app/screens/send/ReviewSend.tsx @@ -23,6 +23,7 @@ import AnalyticsService from 'services/analytics/AnalyticsService' import { Button, Text, View } from '@avalabs/k2-mobile' import { useSelector } from 'react-redux' import { selectActiveNetwork } from 'store/network' +import { NetworkVMType } from '@avalabs/chains-sdk' type NavigationProp = SendTokensScreenProps< typeof AppNavigation.Send.Review @@ -38,6 +39,7 @@ export default function ReviewSend({ appHook: { currencyFormatter } } = useApplicationContext() const activeNetwork = useSelector(selectActiveNetwork) + const isBtcNetwork = Boolean(activeNetwork?.vmName === NetworkVMType.BITCOIN) const { goBack } = useNavigation() const { sendToken, @@ -52,6 +54,14 @@ export default function ReviewSend({ sendStatusMsg } = useSendTokenContext() + const maxFeePerGas = isBtcNetwork + ? fees.maxFeePerGas.toSubUnit().toString() + : fees.maxFeePerGas.toFeeUnit() + + const maxPriorityFeePerGas = isBtcNetwork + ? fees.maxPriorityFeePerGas.toSubUnit().toString() + : fees.maxPriorityFeePerGas.toFeeUnit() + function handleSend(): void { onSendNow() } @@ -145,8 +155,8 @@ export default function ReviewSend({ content={ } position={'right'}