Skip to content

Commit

Permalink
fix: prettier errors
Browse files Browse the repository at this point in the history
  • Loading branch information
compojoom committed Nov 18, 2024
1 parent 94bc9a7 commit f32b1b5
Show file tree
Hide file tree
Showing 13 changed files with 160 additions and 137 deletions.
44 changes: 22 additions & 22 deletions src/components/common/NetworkSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ import { skipToken } from '@reduxjs/toolkit/query'
import { hasMultiChainAddNetworkFeature } from '@/features/multichain/utils/utils'

const ChainIndicatorWithFiatBalance = ({
isSelected,
chain,
safeAddress,
}: {
isSelected,
chain,
safeAddress,
}: {
isSelected: boolean
chain: ChainInfo
safeAddress: string
Expand All @@ -74,8 +74,8 @@ export const getNetworkLink = (router: NextRouter, safeAddress: string, networkS
const query = (
isSafeOpened
? {
safe: `${networkShortName}:${safeAddress}`,
}
safe: `${networkShortName}:${safeAddress}`,
}
: { chain: networkShortName }
) as {
safe?: string
Expand All @@ -96,10 +96,10 @@ export const getNetworkLink = (router: NextRouter, safeAddress: string, networkS
}

const UndeployedNetworkMenuItem = ({
chain,
isSelected = false,
onSelect,
}: {
chain,
isSelected = false,
onSelect,
}: {
chain: ChainInfo & { available: boolean }
isSelected?: boolean
onSelect: (chain: ChainInfo) => void
Expand Down Expand Up @@ -163,11 +163,11 @@ const TestnetDivider = () => {
}

const UndeployedNetworks = ({
deployedChains,
chains,
safeAddress,
closeNetworkSelect,
}: {
deployedChains,
chains,
safeAddress,
closeNetworkSelect,
}: {
deployedChains: string[]
chains: ChainInfo[]
safeAddress: string
Expand Down Expand Up @@ -331,9 +331,9 @@ const UndeployedNetworks = ({
}

const NetworkSelector = ({
onChainSelect,
offerSafeCreation = false,
}: {
onChainSelect,
offerSafeCreation = false,
}: {
onChainSelect?: () => void
offerSafeCreation?: boolean
}): ReactElement => {
Expand Down Expand Up @@ -433,10 +433,10 @@ const NetworkSelector = ({
},
...(isDarkMode
? {
'& .Mui-selected, & .Mui-selected:hover': {
backgroundColor: `${theme.palette.secondary.background} !important`,
},
}
'& .Mui-selected, & .Mui-selected:hover': {
backgroundColor: `${theme.palette.secondary.background} !important`,
},
}
: {}),
},
}}
Expand Down
48 changes: 24 additions & 24 deletions src/components/new-safe/create/steps/ReviewStep/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ import { updateAddressBook } from '../../logic/address-book'
import chains from '@/config/chains'

export const NetworkFee = ({
totalFee,
chain,
isWaived,
inline = false,
}: {
totalFee,
chain,
isWaived,
inline = false,
}: {
totalFee: string
chain: ChainInfo | undefined
isWaived: boolean
Expand All @@ -76,11 +76,11 @@ export const NetworkFee = ({
}

export const SafeSetupOverview = ({
name,
owners,
threshold,
networks,
}: {
name,
owners,
threshold,
networks,
}: {
name?: string
owners: NamedAddress[]
threshold: number
Expand Down Expand Up @@ -180,23 +180,23 @@ const ReviewStep = ({ data, onSubmit, onBack, setStep }: StepRenderProps<NewSafe
() =>
chain
? createNewUndeployedSafeWithoutSalt(
data.safeVersion,
{
owners: data.owners.map((owner) => owner.address),
threshold: data.threshold,
},
chain,
)
data.safeVersion,
{
owners: data.owners.map((owner) => owner.address),
threshold: data.threshold,
},
chain,
)
: undefined,
[chain, data.owners, data.safeVersion, data.threshold],
)

const safePropsForGasEstimation = useMemo(() => {
return newSafeProps
? {
...newSafeProps,
saltNonce: Date.now().toString(),
}
...newSafeProps,
saltNonce: Date.now().toString(),
}
: undefined
}, [newSafeProps])

Expand Down Expand Up @@ -308,10 +308,10 @@ const ReviewStep = ({ data, onSubmit, onBack, setStep }: StepRenderProps<NewSafe

const options: DeploySafeProps['options'] = isEIP1559
? {
maxFeePerGas: maxFeePerGas?.toString(),
maxPriorityFeePerGas: maxPriorityFeePerGas?.toString(),
gasLimit: gasLimit?.toString(),
}
maxFeePerGas: maxFeePerGas?.toString(),
maxPriorityFeePerGas: maxPriorityFeePerGas?.toString(),
gasLimit: gasLimit?.toString(),
}
: { gasPrice: maxFeePerGas?.toString(), gasLimit: gasLimit?.toString() }

const onSubmitCallback = async (taskId?: string, txHash?: string) => {
Expand Down
23 changes: 13 additions & 10 deletions src/components/settings/owner/OwnerList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,30 @@ export const OwnerList = () => {
}}
>
Members

</Typography>
</Grid>

<Grid item xs>
<Typography fontWeight="bold" sx={{
mb: 2,
}}>
<Typography
fontWeight="bold"
sx={{
mb: 2,
}}
>
Signers
</Typography>
<Typography mb={2}>
Signers have full control over the account, they can propose, sign and execute transactions, as well as
reject them.
</Typography>

<Box sx={{
pt: 2,
display: 'flex',
justifyContent: 'space-between',
}}>

<Box
sx={{
pt: 2,
display: 'flex',
justifyContent: 'space-between',
}}
>
<CheckWallet>
{(isOk) => (
<Track {...SETTINGS_EVENTS.SETUP.ADD_OWNER}>
Expand Down
9 changes: 5 additions & 4 deletions src/components/transactions/TxSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ const TxSummary = ({ item, isConflictGroup, isBulkGroup }: TxSummaryProps): Reac
<DateTime value={tx.timestamp} />
</Box>
{isQueue && executionInfo && (
<Box sx={{
gridArea: 'confirmations',
}}>
<Box
sx={{
gridArea: 'confirmations',
}}
>
{executionInfo.confirmationsSubmitted > 0 || isPending ? (
<TxConfirmations
submittedConfirmations={executionInfo.confirmationsSubmitted}
Expand All @@ -107,7 +109,6 @@ const TxSummary = ({ item, isConflictGroup, isBulkGroup }: TxSummaryProps): Reac
) : (
<TxProposalChip />
)}

</Box>
)}
{isQueue && expiredSwap ? (
Expand Down
14 changes: 7 additions & 7 deletions src/components/tx/DecodedTx/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ export const Divider = () => (
)

const DecodedTx = ({
tx,
txDetails,
decodedData,
showMultisend = true,
showMethodCall = false,
showAdvancedDetails = true,
}: DecodedTxProps): ReactElement => {
tx,
txDetails,
decodedData,
showMultisend = true,
showMethodCall = false,
showAdvancedDetails = true,
}: DecodedTxProps): ReactElement => {
const isMultisend = decodedData?.parameters && !!decodedData?.parameters[0]?.valueDecoded
const isMethodCallInAdvanced = showAdvancedDetails && (!showMethodCall || (isMultisend && showMultisend))

Expand Down
8 changes: 4 additions & 4 deletions src/components/tx/SignOrExecuteForm/SignOrExecuteForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const trackTxEvents = (
const creationEvent = isRoleExecution
? TX_EVENTS.CREATE_VIA_ROLE
: isProposerCreation
? TX_EVENTS.CREATE_VIA_PROPOSER
: TX_EVENTS.CREATE
? TX_EVENTS.CREATE_VIA_PROPOSER
: TX_EVENTS.CREATE
const executionEvent = isRoleExecution ? TX_EVENTS.EXECUTE_VIA_ROLE : TX_EVENTS.EXECUTE
const event = isCreation ? creationEvent : isExecuted ? executionEvent : TX_EVENTS.CONFIRM
const txType = getTransactionTrackingType(details)
Expand Down Expand Up @@ -177,8 +177,8 @@ export const SignOrExecuteForm = ({
isProposing
? ConfirmationTitleTypes.propose
: willExecute
? ConfirmationTitleTypes.execute
: ConfirmationTitleTypes.sign
? ConfirmationTitleTypes.execute
: ConfirmationTitleTypes.sign
}
isCreation={isCreation}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/tx/security/tenderly/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const TxSimulationBlock = ({ transactions, disabled, gasLimit, executionOwner }:
simulateTransaction({
safe,
// fall back to the first owner of the safe in case the transaction is created by a proposer
executionOwner: executionOwner ?? isSafeOwner ? wallet.address : safe.owners[0].value,
executionOwner: (executionOwner ?? isSafeOwner) ? wallet.address : safe.owners[0].value,
transactions,
gasLimit,
} as SimulationTxParams)
Expand Down
39 changes: 25 additions & 14 deletions src/components/welcome/MyAccounts/MultiAccountItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ const MultichainIndicator = ({ safes }: { safes: SafeItem[] }) => {
<Typography
sx={{
fontSize: '14px',
}}>Multichain account on:</Typography>
}}
>
Multichain account on:
</Typography>
{safes.map((safeItem) => (
<Box
key={safeItem.chainId}
Expand Down Expand Up @@ -160,13 +163,18 @@ const MultiAccountItem = ({ onLinkClick, multiSafeAccountItem }: MultiAccountIte
'&.Mui-expanded': { backgroundColor: 'transparent !important' },
}}
>

<Box className={css.safeLink} sx={{
width: '100%',
}}>
<Box sx={{
pr: 2.5,
}} data-testid="group-safe-icon">
<Box
className={css.safeLink}
sx={{
width: '100%',
}}
>
<Box
sx={{
pr: 2.5,
}}
data-testid="group-safe-icon"
>
<SafeIcon address={address} owners={sharedSetup?.owners.length} threshold={sharedSetup?.threshold} />
</Box>
<Typography variant="body2" component="div" className={css.safeAddress}>
Expand Down Expand Up @@ -194,12 +202,15 @@ const MultiAccountItem = ({ onLinkClick, multiSafeAccountItem }: MultiAccountIte
</Typography>
</Typography>
<MultichainIndicator safes={safes} />
<Typography data-testid="group-balance" variant="body2"
sx={{
fontWeight: 'bold',
textAlign: 'right',
pl: 2,
}}>
<Typography
data-testid="group-balance"
variant="body2"
sx={{
fontWeight: 'bold',
textAlign: 'right',
pl: 2,
}}
>
{totalFiatValue !== undefined ? (
<FiatValue value={totalFiatValue} />
) : (
Expand Down
Loading

0 comments on commit f32b1b5

Please sign in to comment.