Showing 529 of 1,757 total issues
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
if (totalStake.isEqualTo(0)) return 0;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return createBigNumber(value).toNumber();
Avoid too many return
statements within this function. Open
return 90;
Avoid too many return
statements within this function. Open
return MALFORMED_OUTCOME;
Avoid too many return
statements within this function. Open
return 100;
Avoid too many return
statements within this function. Open
if (transaction.status === SUCCESS) return SUCCESS;
Avoid too many return
statements within this function. Open
return { ...pendingLiquidityOrders };
Avoid too many return
statements within this function. Open
return p;
Avoid too many return
statements within this function. Open
return firstTrade.type;
Avoid too many return
statements within this function. Open
return {
...marketsData,
[marketId]: {
...marketsData[marketId],
ethBalance
Avoid too many return
statements within this function. Open
if (!marketId) return marketsData;
Avoid too many return
statements within this function. Open
return p;
Avoid too many return
statements within this function. Open
if (!marketId) return marketsData;
Avoid too many return
statements within this function. Open
return {
...marketsData,
[marketId]: {
...marketsData[marketId],
frozenSharesValue
Function populateFromOutcome
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const populateFromOutcome = (
marketType,
outcomes,
market,
stake,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function default
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function() {
if (typeof window === "undefined") return false;
if (!window) return false;
if (!window.ethereum) {
if (window.web3 && window.web3.currentProvider) return true;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function makePath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function makePath(paths, match) {
// Invalid, return root
if (
(paths.constructor !== String && paths.constructor !== Array) ||
(match && paths.constructor !== Array)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function mapDispatchToProps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const mapDispatchToProps = dispatch => ({
markModalAsSeen: () => {
const localStorageRef =
typeof window !== "undefined" && window.localStorage;
if (localStorageRef && localStorageRef.setItem) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"