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

Fix: add loading icon to Sign/Execute buttons #2805

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
6 changes: 3 additions & 3 deletions src/components/tx/SignOrExecuteForm/ExecuteForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type ReactElement, type SyntheticEvent, useContext, useState } from 'react'
import { Box, Button, CardActions, Divider } from '@mui/material'
import { CircularProgress, Box, Button, CardActions, Divider } from '@mui/material'
import classNames from 'classnames'

import ErrorMessage from '@/components/tx/ErrorMessage'
Expand Down Expand Up @@ -159,8 +159,8 @@ const ExecuteForm = ({
{/* Submit button */}
<CheckWallet allowNonOwner={onlyExecute}>
{(isOk) => (
<Button variant="contained" type="submit" disabled={!isOk || submitDisabled}>
Execute
<Button variant="contained" type="submit" disabled={!isOk || submitDisabled} sx={{ minWidth: '112px' }}>
{!isSubmittable ? <CircularProgress size={20} /> : 'Execute'}
</Button>
)}
</CheckWallet>
Expand Down
6 changes: 3 additions & 3 deletions src/components/tx/SignOrExecuteForm/SignForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type ReactElement, type SyntheticEvent, useContext, useState } from 'react'
import { Box, Button, CardActions, Divider } from '@mui/material'
import { CircularProgress, Box, Button, CardActions, Divider } from '@mui/material'

import ErrorMessage from '@/components/tx/ErrorMessage'
import { trackError, Errors } from '@/services/exceptions'
Expand Down Expand Up @@ -103,8 +103,8 @@ const SignForm = ({
{/* Submit button */}
<CheckWallet>
{(isOk) => (
<Button variant="contained" type="submit" disabled={!isOk || submitDisabled}>
Sign
<Button variant="contained" type="submit" disabled={!isOk || submitDisabled} sx={{ minWidth: '82px' }}>
{!isSubmittable ? <CircularProgress size={20} /> : 'Sign'}
</Button>
)}
</CheckWallet>
Expand Down
Loading