Skip to content

Commit

Permalink
remove unused fields from dependency array
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwbabylonlab committed Dec 12, 2024
1 parent 3a8af0e commit d70387b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 27 deletions.
28 changes: 3 additions & 25 deletions src/app/components/Staking/Staking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,8 @@ export const Staking = () => {
isError,
isLoading,
} = useAppState();
const {
connected,
address,
publicKeyNoCoord,
network: btcWalletNetwork,
getNetworkFees,
} = useBTCWallet();
const { connected, address, publicKeyNoCoord, getNetworkFees } =
useBTCWallet();

const disabled = isError;

Expand Down Expand Up @@ -271,18 +266,7 @@ export const Staking = () => {

// Memoize the staking fee calculation
const stakingFeeSat = useMemo(() => {
if (
!(
btcWalletNetwork &&
address &&
latestParam &&
publicKeyNoCoord &&
stakingAmountSat &&
finalityProvider &&
mempoolFeeRates &&
availableUTXOs
)
) {
if (!(stakingAmountSat && finalityProvider && minFeeRate)) {
return 0;
}

Expand All @@ -305,14 +289,8 @@ export const Staking = () => {
return 0;
}
}, [
btcWalletNetwork,
address,
latestParam,
publicKeyNoCoord,
stakingAmountSat,
finalityProvider,
mempoolFeeRates,
availableUTXOs,
selectedFeeRate,
minFeeRate,
defaultFeeRate,
Expand Down
4 changes: 2 additions & 2 deletions src/app/state/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const { StateProvider, useState: useApplicationState } =
isError: false,
totalBalance: 0,
ordinalsExcluded: true,
includeOrdinals: () => { },
excludeOrdinals: () => { },
includeOrdinals: () => {},
excludeOrdinals: () => {},
});

export function AppState({ children }: PropsWithChildren) {
Expand Down

0 comments on commit d70387b

Please sign in to comment.