Skip to content

Commit

Permalink
Remove low gas modal (#671)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0neerpat authored Aug 2, 2024
1 parent 3e85cf3 commit fb31a7a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 1 addition & 13 deletions src/components/Steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import StepsContent from './StepsContent'
import { COIN_TICKER } from '~/utils'
import useGeb from '~/hooks/useGeb'
import { Tooltip as ReactTooltip } from 'react-tooltip'
import { checkUserGasBalance } from '~/utils'
import LowGasModal from './Modals/LowGasModal'

const Steps = () => {
const { t } = useTranslation()
Expand All @@ -36,11 +34,7 @@ const Steps = () => {

const handleCreateAccount = async () => {
if (!account || !provider || !chainId) return false
const hasGasToken = await checkUserGasBalance(account!, provider!)
if (!hasGasToken) {
popupsActions.setIsLowGasModalOpen(true)
return
}

try {
const txData = await geb.contracts.proxyRegistry.populateTransaction['build()']()
const signer = provider.getSigner(account)
Expand All @@ -62,11 +56,6 @@ const Steps = () => {
})
await txResponse.wait()
} catch (e) {
const hasGasToken = await checkUserGasBalance(account, provider)
if (!hasGasToken) {
// bridgeModelActions.setReason('No funds for gas fee, please bridge some funds.')
// popupsActions.setIsLowGasModalOpen(true)
}
connectWalletActions.setIsStepLoading(false)
handleTransactionError(e)
}
Expand Down Expand Up @@ -127,7 +116,6 @@ const Steps = () => {

return (
<StepsContainer>
<LowGasModal />
{returnSteps(step)}
{step === 1 && ctHash ? (
<>
Expand Down
2 changes: 0 additions & 2 deletions src/containers/Shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const LoadingModal = React.lazy(() => import('~/components/Modals/LoadingModal')
const ProxyModal = React.lazy(() => import('~/components/Modals/ProxyModal'))
const WethModal = React.lazy(() => import('~/components/Modals/WETHModal'))
const LiquidateSafeModal = React.lazy(() => import('~/components/Modals/LiquidateSafeModal'))
const LowGasModal = React.lazy(() => import('~/components/Modals/LowGasModal'))
const ImagePreloader = React.lazy(() => import('~/components/ImagePreloader'))

interface Props {
Expand Down Expand Up @@ -330,7 +329,6 @@ const Shared = ({ children, ...rest }: Props) => {
<ScreenLoader />
<LiquidateSafeModal />
<WaitingModal />
<LowGasModal />
<TopUpModal />
<EmptyDiv>
<Navbar />
Expand Down

0 comments on commit fb31a7a

Please sign in to comment.