Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hamid/74301/handle-timeout-in-account-transfer-form #6270

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ type TCryptoFiatConverterProps = {
from_currency: string;
hint: string | TReactChildren;
is_timer_visible: boolean;
onChangeConverterFromAmount: (event: TReactChangeEvent, from_currency: string, to_currency: string) => void;
onChangeConverterFromAmount: (
event: { target: { value: string } },
from_currency: string,
to_currency: string
) => void;
onChangeConverterToAmount: (event: TReactChangeEvent, from_currency: string, to_currency: string) => void;
resetConverter: () => void;
to_currency: string;
validateFromAmount: () => void;
validateToAmount: () => void;
};
let changed_event_amount: TReactChangeEvent;

const Timer = ({ onComplete }: TTimerProps) => {
const initial_time = 60;
Expand Down Expand Up @@ -150,9 +153,8 @@ const CryptoFiatConverter = ({
{is_timer_visible && (
<Timer
onComplete={() => {
changed_event_amount.target.value = converter_from_amount;
onChangeConverterFromAmount(
{ ...changed_event_amount },
{ target: { value: converter_from_amount } },
from_currency,
to_currency
);
Expand Down