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"],
|
"ul": ["list"],
|
||||||
"ol": ["list"]
|
"ol": ["list"]
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"curly": "warn"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -75,7 +74,8 @@
|
|||||||
"prefer": "type-imports",
|
"prefer": "type-imports",
|
||||||
"disallowTypeAnnotations": true
|
"disallowTypeAnnotations": true
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"curly": ["error", "multi-line"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -197,14 +197,16 @@ export const usePollForDelegations = () => {
|
|||||||
new BigNumber(a.currentEpochStake || 0).isLessThan(
|
new BigNumber(a.currentEpochStake || 0).isLessThan(
|
||||||
b.currentEpochStake || 0
|
b.currentEpochStake || 0
|
||||||
)
|
)
|
||||||
)
|
) {
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
new BigNumber(a.currentEpochStake || 0).isGreaterThan(
|
new BigNumber(a.currentEpochStake || 0).isGreaterThan(
|
||||||
b.currentEpochStake || 0
|
b.currentEpochStake || 0
|
||||||
)
|
)
|
||||||
)
|
) {
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
if ((!a.name && b.name) || a.name < b.name) 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 ((!b.name && a.name) || a.name > b.name) return -1;
|
||||||
if (a.nodeId > b.nodeId) 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
|
// If from is present on eth_call it errors, removing it makes the library set
|
||||||
// from as the connected wallet which works fine
|
// 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;
|
delete params[0].from;
|
||||||
|
}
|
||||||
let result;
|
let result;
|
||||||
// For sending a transaction if we call send it will error
|
// For sending a transaction if we call send it will error
|
||||||
// as it wants gasLimit in sendTransaction but hexlify sets the property gas
|
// 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
|
// If from is present on eth_call it errors, removing it makes the library set
|
||||||
// from as the connected wallet which works fine
|
// 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;
|
delete params[0].from;
|
||||||
|
}
|
||||||
let result;
|
let result;
|
||||||
// For sending a transaction if we call send it will error
|
// For sending a transaction if we call send it will error
|
||||||
// as it wants gasLimit in sendTransaction but hexlify sets the property gas
|
// as it wants gasLimit in sendTransaction but hexlify sets the property gas
|
||||||
|
@ -21,8 +21,11 @@ export const MarketsContainer = ({ onSelect }: MarketsContainerProps) => {
|
|||||||
onRowClicked={(rowEvent: RowClickedEvent) => {
|
onRowClicked={(rowEvent: RowClickedEvent) => {
|
||||||
const { data, event } = rowEvent;
|
const { data, event } = rowEvent;
|
||||||
// filters out clicks on the symbol column because it should display asset details
|
// 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;
|
return;
|
||||||
|
}
|
||||||
onSelect((data as MarketWithData).id);
|
onSelect((data as MarketWithData).id);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -49,15 +49,17 @@ export const Web3ConnectDialog = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
function getConnectorInfo(connector: Connector) {
|
function getConnectorInfo(connector: Connector) {
|
||||||
if (connector instanceof MetaMask)
|
if (connector instanceof MetaMask) {
|
||||||
return {
|
return {
|
||||||
name: 'MetaMask',
|
name: 'MetaMask',
|
||||||
text: t('MetaMask, Brave or other injected web wallet'),
|
text: t('MetaMask, Brave or other injected web wallet'),
|
||||||
};
|
};
|
||||||
if (connector instanceof WalletConnect)
|
}
|
||||||
|
if (connector instanceof WalletConnect) {
|
||||||
return {
|
return {
|
||||||
name: 'WalletConnect',
|
name: 'WalletConnect',
|
||||||
text: t('WalletConnect'),
|
text: t('WalletConnect'),
|
||||||
};
|
};
|
||||||
|
}
|
||||||
return { name: 'Unknown', text: t('Unknown') };
|
return { name: 'Unknown', text: t('Unknown') };
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user