Skip to content

Commit 84389d0

Browse files
committed
fix: linter
1 parent 4d98094 commit 84389d0

File tree

22 files changed

+199
-169
lines changed

22 files changed

+199
-169
lines changed

app/src/components/card/MainCard.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import styled from 'styled-components'
33
export const MainCard = styled.div<{ backgroundOpacity?: string }>`
44
background-color: ${({ theme: { colors } }) => colors.creamLight};
55
border-radius: ${({ theme: { common } }) => common.borderRadiusBigger};
6-
box-shadow: 0px 2.231px 2.775px 0px rgba(0, 0, 0, 0.01), 0px 10.2px 7.8px 0px rgba(0, 0, 0, 0.01),
7-
0px 25.819px 20.925px 0px rgba(0, 0, 0, 0.02), 0px 51px 48px 0px rgba(0, 0, 0, 0.03);
6+
box-shadow:
7+
0px 2.231px 2.775px 0px rgba(0, 0, 0, 0.01),
8+
0px 10.2px 7.8px 0px rgba(0, 0, 0, 0.01),
9+
0px 25.819px 20.925px 0px rgba(0, 0, 0, 0.02),
10+
0px 51px 48px 0px rgba(0, 0, 0, 0.03);
811
display: flex;
912
flex-direction: column;
1013
padding: calc(var(--theme-common-space) * 2) var(--theme-common-space);

app/src/components/card/SidebarCard.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ export const SCLink = styled.a`
4949
padding: var(--theme-common-space) calc(20px - var(--theme-common-space) * 4)
5050
var(--theme-common-space) calc(var(--theme-common-space) * 2);
5151
text-decoration: none;
52-
transition: background-color 0.15s linear, color 0.15s linear;
52+
transition:
53+
background-color 0.15s linear,
54+
color 0.15s linear;
5355
5456
&:hover {
5557
background-color: ${({ theme: { colors } }) => colors.creamDarker};

app/src/components/dropdown/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ const Items = styled.div<ItemProps>`
8989
background: ${({ theme: { dropdown } }) => dropdown.background};
9090
border-radius: ${({ theme: { dropdown } }) => dropdown.borderRadius};
9191
border: 1px solid ${({ theme: { dropdown } }) => dropdown.borderColor};
92-
box-shadow: 0 63px 80px rgba(0, 0, 0, 0.07), 0 31.8937px 34.875px rgba(0, 0, 0, 0.04725),
93-
0 12.6px 13px rgba(0, 0, 0, 0.035), 0 2.75625px 4.625px rgba(0, 0, 0, 0.02275);
92+
box-shadow:
93+
0 63px 80px rgba(0, 0, 0, 0.07),
94+
0 31.8937px 34.875px rgba(0, 0, 0, 0.04725),
95+
0 12.6px 13px rgba(0, 0, 0, 0.035),
96+
0 2.75625px 4.625px rgba(0, 0, 0, 0.02275);
9497
display: ${(props) => (props.$isOpen ? 'block' : 'none')};
9598
min-width: 150px;
9699
max-height: 260px;

app/src/components/form/Textfield.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ export const TextfieldPartsCSS = css<TextfieldCSSProps>`
5555
status === TextfieldStatus.error
5656
? textField.errorColor
5757
: status === TextfieldStatus.success
58-
? textField.successColor
59-
: textField.active.borderColor};
58+
? textField.successColor
59+
: textField.active.borderColor};
6060
box-shadow: ${({ theme: { textField } }) => textField.active.boxShadow};
6161
color: ${({ status, theme: { textField } }) =>
6262
status === TextfieldStatus.error ? textField.errorColor : textField.color};
@@ -123,8 +123,8 @@ export const TextfieldCSS = css<TextfieldCSSProps>`
123123
status === TextfieldStatus.error
124124
? textField.errorColor
125125
: status === TextfieldStatus.success
126-
? textField.successColor
127-
: textField.borderColor};
126+
? textField.successColor
127+
: textField.borderColor};
128128
border-radius: var(--textfield-border-radius);
129129
border-style: solid;
130130
border-width: 0.5px;
@@ -138,7 +138,9 @@ export const TextfieldCSS = css<TextfieldCSSProps>`
138138
overflow: hidden;
139139
padding: var(--textfield-padding);
140140
text-overflow: ellipsis;
141-
transition: border-color 0.15s linear, background-color 0.15s linear;
141+
transition:
142+
border-color 0.15s linear,
143+
background-color 0.15s linear;
142144
white-space: nowrap;
143145
width: 100%;
144146

app/src/components/header/UserDropdown.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ const Wrapper = styled(Dropdown)`
4343
)
4444
);
4545
border-radius: var(--dropdown-items-border-radius);
46-
box-shadow: 0 38.519px 25.481px 0 rgba(0, 0, 0, 0.12), 0 100px 80px 0 rgba(0, 0, 0, 0.2);
46+
box-shadow:
47+
0 38.519px 25.481px 0 rgba(0, 0, 0, 0.12),
48+
0 100px 80px 0 rgba(0, 0, 0, 0.2);
4749
flex-direction: column;
4850
max-height: none;
4951
width: 400px;
@@ -300,8 +302,8 @@ export const UserDropdown: React.FC = ({ ...restProps }) => {
300302
currentNetwork?.chainId === 100
301303
? '/images/icons/gnosis.svg'
302304
: currentNetwork?.chainId === 1
303-
? '/images/icons/ethToken.svg'
304-
: '/images/icons/empty-token.png'
305+
? '/images/icons/ethToken.svg'
306+
: '/images/icons/empty-token.png'
305307
}
306308
/>
307309
</ChainIconWrapper>

app/src/hooks/bridge/useBridgeTransactionInfo.tsx

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -270,16 +270,16 @@ const handleERC20TokenFromForeign = async ({
270270
amount.toString(),
271271
)
272272
: isERC677
273-
? (tokenContract as ERC677).transferAndCall(
274-
bridgeContract.address,
275-
amount.toString(),
276-
walletAddress,
277-
)
278-
: (bridgeContract as ForeignOmniMediator)['relayTokens(address,address,uint256)'](
279-
tokenAddress,
280-
walletAddress,
281-
amount.toString(),
282-
)
273+
? (tokenContract as ERC677).transferAndCall(
274+
bridgeContract.address,
275+
amount.toString(),
276+
walletAddress,
277+
)
278+
: (bridgeContract as ForeignOmniMediator)['relayTokens(address,address,uint256)'](
279+
tokenAddress,
280+
walletAddress,
281+
amount.toString(),
282+
)
283283
},
284284
}
285285
}
@@ -653,68 +653,68 @@ export const getBridgeTx = async ({
653653
allowance,
654654
})
655655
: isUsdceGnosis
656-
? await handleUsdceFromHome({
657-
bridgeContract: bridgeContract as HomeOmniMediator,
658-
signer,
659-
amount,
660-
tokenAddress,
661-
userAddress: account,
662-
recipient,
663-
allowance,
664-
tokenMode,
665-
})
666-
: isUsdcEth
667-
? await handleUsdcFromForeign({
668-
bridgeContract: bridgeContract as ForeignOmniMediator,
669-
signer,
670-
amount,
671-
tokenAddress,
672-
allowance,
673-
tokenMode,
674-
recipient,
675-
userAddress: account,
676-
})
677-
: isNativeToken
678-
? isFromHome
679-
? await handleNativeTokenFromHome({
680-
bridgeContract: bridgeContract as HomeBridgeErcToNative,
656+
? await handleUsdceFromHome({
657+
bridgeContract: bridgeContract as HomeOmniMediator,
681658
signer,
682659
amount,
683-
recipient,
684-
fromChainId,
660+
tokenAddress,
685661
userAddress: account,
686-
toTokenAddress,
687-
})
688-
: await handleNativeTokenFromForeign({
689-
bridgeContract: bridgeContract as NativeOmniBridgeMediator,
690-
signer,
691-
amount,
692-
walletAddress: recipient || account,
662+
recipient,
663+
allowance,
664+
tokenMode,
693665
})
694-
: isFromHome
695-
? await handleERC20TokenFromHome({
696-
bridgeContract: bridgeContract as HomeOmniMediator,
697-
signer,
698-
amount,
699-
tokenAddress,
700-
toChainId,
701-
tokenMode,
702-
userAddress: account,
703-
recipient,
704-
receiveNativeToken,
705-
allowance,
706-
})
707-
: await handleERC20TokenFromForeign({
708-
bridgeContract: bridgeContract as ForeignOmniMediator,
709-
signer,
710-
amount,
711-
tokenAddress,
712-
allowance,
713-
tokenMode,
714-
recipient,
715-
userAddress: account,
716-
isDAI: isNativeBridge, // use nativeBridge for DAI
717-
})
666+
: isUsdcEth
667+
? await handleUsdcFromForeign({
668+
bridgeContract: bridgeContract as ForeignOmniMediator,
669+
signer,
670+
amount,
671+
tokenAddress,
672+
allowance,
673+
tokenMode,
674+
recipient,
675+
userAddress: account,
676+
})
677+
: isNativeToken
678+
? isFromHome
679+
? await handleNativeTokenFromHome({
680+
bridgeContract: bridgeContract as HomeBridgeErcToNative,
681+
signer,
682+
amount,
683+
recipient,
684+
fromChainId,
685+
userAddress: account,
686+
toTokenAddress,
687+
})
688+
: await handleNativeTokenFromForeign({
689+
bridgeContract: bridgeContract as NativeOmniBridgeMediator,
690+
signer,
691+
amount,
692+
walletAddress: recipient || account,
693+
})
694+
: isFromHome
695+
? await handleERC20TokenFromHome({
696+
bridgeContract: bridgeContract as HomeOmniMediator,
697+
signer,
698+
amount,
699+
tokenAddress,
700+
toChainId,
701+
tokenMode,
702+
userAddress: account,
703+
recipient,
704+
receiveNativeToken,
705+
allowance,
706+
})
707+
: await handleERC20TokenFromForeign({
708+
bridgeContract: bridgeContract as ForeignOmniMediator,
709+
signer,
710+
amount,
711+
tokenAddress,
712+
allowance,
713+
tokenMode,
714+
recipient,
715+
userAddress: account,
716+
isDAI: isNativeBridge, // use nativeBridge for DAI
717+
})
718718

719719
return {
720720
gasLimit,

app/src/hooks/useLookupBridgedToken.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ export const useLookupBridgedToken = ({
108108
isNativeInXdaiBridge
109109
? gnosisXdaiToken
110110
: tokenAddress
111-
? tokensByAddress[tokenAddress] ??
112-
tokenList.find(({ address }) => isSameString(address, tokenAddress))
113-
: undefined,
111+
? (tokensByAddress[tokenAddress] ??
112+
tokenList.find(({ address }) => isSameString(address, tokenAddress)))
113+
: undefined,
114114
)
115115
}
116116
}, [

app/src/pagePartials/bridge/bridgeForm/Switch.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ const Wrapper = styled.button`
77
border-radius: 50%;
88
border: 1px solid ${({ theme: { colors } }) => colors.cream};
99
bottom: 0;
10-
box-shadow: 0 2.231px 2.775px 0 rgba(0, 0, 0, 0.01), 0 10.2px 7.8px 0 rgba(0, 0, 0, 0.01),
11-
0 25.819px 20.925px 0 rgba(0, 0, 0, 0.02), 0 51px 48px 0 rgba(0, 0, 0, 0.03);
10+
box-shadow:
11+
0 2.231px 2.775px 0 rgba(0, 0, 0, 0.01),
12+
0 10.2px 7.8px 0 rgba(0, 0, 0, 0.01),
13+
0 25.819px 20.925px 0 rgba(0, 0, 0, 0.02),
14+
0 51px 48px 0 rgba(0, 0, 0, 0.03);
1215
color: ${({ theme: { colors } }) => colors.primary};
1316
cursor: pointer;
1417
display: flex;
@@ -27,8 +30,11 @@ const Wrapper = styled.button`
2730
}
2831
2932
&:active {
30-
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.005), 0 5px 4px 0 rgba(0, 0, 0, 0.005),
31-
0 12px 10px 0 rgba(0, 0, 0, 0.01), 0 15px 15px 0 rgba(0, 0, 0, 0.01);
33+
box-shadow:
34+
0 2px 2px 0 rgba(0, 0, 0, 0.005),
35+
0 5px 4px 0 rgba(0, 0, 0, 0.005),
36+
0 12px 10px 0 rgba(0, 0, 0, 0.01),
37+
0 15px 15px 0 rgba(0, 0, 0, 0.01);
3238
opacity: 0.9;
3339
}
3440
`

app/src/pagePartials/bridge/bridgeForm/bridgeWithSteps/IconStatus.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ export const IconStatus: React.FC<Props> = ({ statusIcon, ...restProps }) => {
6464
statusIcon === 'success'
6565
? 'icon-success.svg'
6666
: statusIcon === 'pending'
67-
? 'icon-waiting.svg'
68-
: statusIcon === 'warning'
69-
? 'icon-warning.svg'
70-
: 'icon-not-required.svg'
67+
? 'icon-waiting.svg'
68+
: statusIcon === 'warning'
69+
? 'icon-warning.svg'
70+
: 'icon-not-required.svg'
7171

7272
if (statusIcon === 'waiting') return <WrapperBordered {...restProps} />
7373
if (statusIcon === 'none') return <Wrapper {...restProps} />

app/src/pagePartials/bridgeExplorer/bridges/ContractLimit.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ const ProgressBar = styled.div<{ status: string; width: number }>`
2929
props.status === HealthStatusTypes.success
3030
? ({ theme }) => theme.colors.success
3131
: props.status === HealthStatusTypes.warning
32-
? ({ theme }) => theme.colors.warning
33-
: props.status === HealthStatusTypes.error
34-
? ({ theme }) => theme.colors.error
35-
: ({ theme }) => theme.colors.warning};
32+
? ({ theme }) => theme.colors.warning
33+
: props.status === HealthStatusTypes.error
34+
? ({ theme }) => theme.colors.error
35+
: ({ theme }) => theme.colors.warning};
3636
border-radius: var(--border-radius);
3737
height: 100%;
3838
left: 0;

0 commit comments

Comments
 (0)