From 27ead34989c0b70565f6149d9cc4c89c497eeeff Mon Sep 17 00:00:00 2001 From: coreyphillips Date: Tue, 14 May 2024 09:50:47 -0400 Subject: [PATCH] fix(wallet): Fix Boost Fee Conversion Removes btcToSats method when calculating boost fees. Fixes #1816 --- src/screens/Wallets/BoostPrompt.tsx | 3 +-- src/utils/wallet/transactions.ts | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/screens/Wallets/BoostPrompt.tsx b/src/screens/Wallets/BoostPrompt.tsx index 73fbfe278..d838a3eaf 100644 --- a/src/screens/Wallets/BoostPrompt.tsx +++ b/src/screens/Wallets/BoostPrompt.tsx @@ -19,7 +19,6 @@ import { updateFee, } from '../../utils/wallet/transactions'; import { showToast } from '../../utils/notifications'; -import { btcToSats } from '../../utils/conversion'; import { TOnchainActivityItem } from '../../store/types/activity'; import { useBottomSheetBackPress, @@ -57,7 +56,7 @@ const BoostForm = ({ const [showCustom, setShowCustom] = useState(false); const boostData = useMemo(() => canBoost(activityItem.id), [activityItem.id]); - const activityItemFee = btcToSats(activityItem.fee); + const activityItemFee = activityItem.fee; const recommendedFee = feeEstimates.fast; const { description: duration } = useFeeText(transaction.satsPerByte); diff --git a/src/utils/wallet/transactions.ts b/src/utils/wallet/transactions.ts index 50d576b99..f88f02640 100644 --- a/src/utils/wallet/transactions.ts +++ b/src/utils/wallet/transactions.ts @@ -4,7 +4,7 @@ import validate, { getAddressInfo } from 'bitcoin-address-validation'; import { __E2E__ } from '../../constants/env'; import { EAvailableNetwork } from '../networks'; import { reduceValue } from '../helpers'; -import { btcToSats, satsToBtc } from '../conversion'; +import { btcToSats } from '../conversion'; import { TWalletName } from '../../store/types/wallet'; import { getBalance, @@ -1103,7 +1103,7 @@ export const broadcastBoost = async ({ const updatedActivityItemData: Partial = { txId: newTxId, address: transaction.changeAddress, - fee: oldFee + satsToBtc(transaction.fee), + fee: oldFee + transaction.fee, isBoosted: true, timestamp: new Date().getTime(), };