chore: set curly eslint rule to multi line (#1322)
* chore: set curly eslint rule to multi line * chore: fix lint * chore: make eslint rule error and fix resulting errors
This commit is contained in:
parent
4aa9bbaa23
commit
b8d5680011
@ -51,8 +51,7 @@
|
||||
"ul": ["list"],
|
||||
"ol": ["list"]
|
||||
}
|
||||
],
|
||||
"curly": "warn"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -75,7 +74,8 @@
|
||||
"prefer": "type-imports",
|
||||
"disallowTypeAnnotations": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"curly": ["error", "multi-line"]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -197,14 +197,16 @@ export const usePollForDelegations = () => {
|
||||
new BigNumber(a.currentEpochStake || 0).isLessThan(
|
||||
b.currentEpochStake || 0
|
||||
)
|
||||
)
|
||||
) {
|
||||
return 1;
|
||||
}
|
||||
if (
|
||||
new BigNumber(a.currentEpochStake || 0).isGreaterThan(
|
||||
b.currentEpochStake || 0
|
||||
)
|
||||
)
|
||||
) {
|
||||
return -1;
|
||||
}
|
||||
if ((!a.name && b.name) || a.name < b.name) return 1;
|
||||
if ((!b.name && a.name) || a.name > b.name) return -1;
|
||||
if (a.nodeId > b.nodeId) return 1;
|
||||
|
@ -34,8 +34,9 @@ export class CustomizedBridge extends Eip1193Bridge {
|
||||
|
||||
// If from is present on eth_call it errors, removing it makes the library set
|
||||
// from as the connected wallet which works fine
|
||||
if (params && params.length && params[0].from && method === 'eth_call')
|
||||
if (params && params.length && params[0].from && method === 'eth_call') {
|
||||
delete params[0].from;
|
||||
}
|
||||
let result;
|
||||
// For sending a transaction if we call send it will error
|
||||
// as it wants gasLimit in sendTransaction but hexlify sets the property gas
|
||||
|
@ -50,8 +50,9 @@ export class CustomizedBridge extends Eip1193Bridge {
|
||||
|
||||
// If from is present on eth_call it errors, removing it makes the library set
|
||||
// from as the connected wallet which works fine
|
||||
if (params && params.length && params[0].from && method === 'eth_call')
|
||||
if (params && params.length && params[0].from && method === 'eth_call') {
|
||||
delete params[0].from;
|
||||
}
|
||||
let result;
|
||||
// For sending a transaction if we call send it will error
|
||||
// as it wants gasLimit in sendTransaction but hexlify sets the property gas
|
||||
|
@ -21,8 +21,11 @@ export const MarketsContainer = ({ onSelect }: MarketsContainerProps) => {
|
||||
onRowClicked={(rowEvent: RowClickedEvent) => {
|
||||
const { data, event } = rowEvent;
|
||||
// filters out clicks on the symbol column because it should display asset details
|
||||
if ((event?.target as HTMLElement).tagName.toUpperCase() === 'BUTTON')
|
||||
if (
|
||||
(event?.target as HTMLElement).tagName.toUpperCase() === 'BUTTON'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
onSelect((data as MarketWithData).id);
|
||||
}}
|
||||
/>
|
||||
|
@ -49,15 +49,17 @@ export const Web3ConnectDialog = ({
|
||||
};
|
||||
|
||||
function getConnectorInfo(connector: Connector) {
|
||||
if (connector instanceof MetaMask)
|
||||
if (connector instanceof MetaMask) {
|
||||
return {
|
||||
name: 'MetaMask',
|
||||
text: t('MetaMask, Brave or other injected web wallet'),
|
||||
};
|
||||
if (connector instanceof WalletConnect)
|
||||
}
|
||||
if (connector instanceof WalletConnect) {
|
||||
return {
|
||||
name: 'WalletConnect',
|
||||
text: t('WalletConnect'),
|
||||
};
|
||||
}
|
||||
return { name: 'Unknown', text: t('Unknown') };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user