Skip to content

Commit

Permalink
refactor: cleanup transaction component types and remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
nelitow committed Feb 6, 2025
1 parent 30ad200 commit f3a2d9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ import {
import type {
BN,
TransactionRequest,
TransactionResult,
TransactionStatus,
TransactionSummary,
} from 'fuels';
import { useMemo } from 'react';
import { type ReactNode, useMemo } from 'react';
import { useFormContext } from 'react-hook-form';
import { type Maybe, MotionStack, animations } from '~/systems/Core';
import type { SendFormValues } from '~/systems/Send/hooks';
Expand Down Expand Up @@ -85,7 +84,7 @@ function TxContentLoader() {
}

export type TxContentInfoProps = {
footer?: React.ReactNode;
footer?: ReactNode;
tx: TransactionSummary;
txStatus?: Maybe<TransactionStatus>;
showDetails?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const TxFeeRadio: TxFeeRadioComponent = ({
checked,
title,
}: TxFeeRadioProps) => {
const [_flag, setFlag] = useState(false);
const provider = useProvider();
const [baseAsset, setBaseAsset] = useState<AssetFuelData | undefined>();
useEffect(() => {
Expand Down Expand Up @@ -57,13 +56,6 @@ export const TxFeeRadio: TxFeeRadioComponent = ({

const ready = !!fee && !!feeInUsd;

// Horrible workaround to force re-render of this section.
useEffect(() => {
setTimeout(() => {
setFlag((prev) => !prev);
}, 500);
}, [ready]);

if (!ready) return <TxFee.Loader />;

return (
Expand Down

0 comments on commit f3a2d9e

Please sign in to comment.