Skip to content

Commit

Permalink
Assorted linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Leandro committed Mar 4, 2022
1 parent 6c186f9 commit 279130c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function GnosisSafeTxDetails(props: {
signaturesMessage = <span>Expired order</span>
} else if (alreadySigned) {
signaturesMessage = <span>Enough signatures</span>
} else if (numConfirmations == 0) {
} else if (numConfirmations === 0) {
signaturesMessage = (
<>
<span>
Expand Down
2 changes: 1 addition & 1 deletion src/custom/pages/Claim/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export default function Claim() {
if (!selected.length) {
console.log('Starting claiming with', claimInputData)
sendTransaction(claimInputData)
} else if (investFlowStep == 2) {
} else if (investFlowStep === 2) {
console.log('Starting claiming with', claimInputData)
sendTransaction(claimInputData)
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/custom/pages/Profile/VCOWDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const DropdownWrapper = styled.button<{ hasBalance?: boolean }>`
:focus {
cursor: ${({ hasBalance }) => (hasBalance ? 'pointer' : 'inherit')};
outline: none;
border: ${({ hasBalance }) => (hasBalance ? '1px solid ${({ theme }) => theme.bg3}' : '1px solid transparent')};
border: ${({ hasBalance }) => (hasBalance ? `1px solid $\{({ theme }) => theme.bg3}` : '1px solid transparent')};
}
${({ theme }) => theme.mediaWidth.upToVerySmall`
min-width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions src/custom/pages/Profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { getExplorerAddressLink } from 'utils/explorer'
import useTimeAgo from 'hooks/useTimeAgo'
import { MouseoverTooltipContent } from 'components/Tooltip'
import NotificationBanner from 'components/NotificationBanner'
import { SupportedChainId as ChainId } from 'constants/chains'
import { SupportedChainId, SupportedChainId as ChainId } from 'constants/chains'
import AffiliateStatusCheck from 'components/AffiliateStatusCheck'
import { useHasOrders } from 'api/gnosisProtocol/hooks'
import { Title } from 'components/Page'
Expand All @@ -41,7 +41,7 @@ export default function Profile() {
const { account, chainId } = useActiveWeb3React()
const { profileData, isLoading, error } = useFetchProfile()
const lastUpdated = useTimeAgo(profileData?.lastUpdated)
const isTradesTooltipVisible = account && chainId == 1 && !!profileData?.totalTrades
const isTradesTooltipVisible = account && chainId === SupportedChainId.MAINNET && !!profileData?.totalTrades
const hasOrders = useHasOrders(account)

const vCowBalance = useTokenBalance(account || undefined, chainId ? V_COW[chainId] : undefined)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function RedirectAnySwapAffectedUsers() {
const isAnySwapAffectedUser = useIsAnySwapAffectedUser()

useEffect(() => {
// eslint-disable-next-line no-restricted-globals
if (isAnySwapAffectedUser && location.pathname !== WARNING_PAGE) {
// Redirect to warning page
history.push(WARNING_PAGE)
Expand Down
2 changes: 1 addition & 1 deletion src/custom/pages/error/AnySwapAffectedUsers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ExternalLink as ExternalLinkTheme } from 'theme'
const ExternalLink = styled(ExternalLinkTheme)``

const Wrapper = styled(Page)`
${GdocsListStyle}
${GdocsListStyle};
min-height: auto;
padding-bottom: 32px;
${({ theme }) => theme.mediaWidth.upToSmall`
Expand Down
2 changes: 1 addition & 1 deletion src/custom/state/claim/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ function useDeploymentTimestamp(): number | null {
}

// Invalidate timestamp
if (chainId != oldChainId.current) {
if (chainId !== oldChainId.current) {
setTimestamp(null)
oldChainId.current = chainId
}
Expand Down
2 changes: 1 addition & 1 deletion src/custom/state/orders/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function isPresignPending(order: Pick<OrderMetaData, 'status'>): boolean {
* An order is considered presigned, when it transitions from "presignaturePending" to just "pending"
*/
function isOrderPresigned(order: Pick<OrderMetaData, 'signingScheme' | 'status'>): boolean {
return order.signingScheme == 'presign' && order.status === 'open'
return order.signingScheme === 'presign' && order.status === 'open'
}

export function classifyOrder(
Expand Down

0 comments on commit 279130c

Please sign in to comment.