Skip to content

Commit

Permalink
feat: better skip route loading state in deposit modal (#1414)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinaszheng authored Jan 10, 2025
1 parent 3604152 commit fcb8990
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/views/dialogs/DepositDialog2/DepositForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Dispatch, SetStateAction, useEffect, useState } from 'react';

import { formatUnits, parseUnits } from 'viem';

import { ButtonAction, ButtonState, ButtonType } from '@/constants/buttons';
import { ButtonAction, ButtonType } from '@/constants/buttons';
import { DialogTypes } from '@/constants/dialogs';
import { STRING_KEYS } from '@/constants/localization';
import { USDC_DECIMALS } from '@/constants/tokens';
Expand Down Expand Up @@ -95,7 +95,7 @@ export const DepositForm = ({
<div tw="flex flex-col gap-0.5">
<Button
tw="w-full"
state={ButtonState.Disabled}
state={{ isDisabled: true, isLoading: isFetching }}
disabled
action={ButtonAction.Primary}
type={ButtonType.Submit}
Expand Down
2 changes: 1 addition & 1 deletion src/views/dialogs/DepositDialog2/RouteOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const RouteOptions = ({
</span>
}
selected={selectedSpeed === 'slow'}
disabled={disabled || !routes.slow}
disabled={disabled || isLoading || !routes.slow}
onClick={() => onSelectSpeed('slow')}
// TODO(deposit2.0): localization
title="~20 mins"
Expand Down

0 comments on commit fcb8990

Please sign in to comment.