Showing 60 of 126 total issues
Function NoConnection
has 132 lines of code (exceeds 50 allowed). Consider refactoring. Open
const NoConnection = () => {
return (
<div className={styles.NoEthereumSection}>
{/*<img className={styles.ImgHeaderLogo} alt="Maker" src={MakerLogo} />*/}
{/*<hr className={styles.HorizontalLine} />*/}
- Create a ticketCreate a ticket
Function healthCheck
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
export const healthCheck = async (
dispatch,
getState,
isInitialHealthcheck = false
) => {
- Read upRead up
- Create a ticketCreate a ticket
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 onNetworkCheckEndEpic
has 96 lines of code (exceeds 50 allowed). Consider refactoring. Open
export const onNetworkCheckEndEpic = (
dispatch,
getState,
setInitialSubscriptions,
accountChanged
- Create a ticketCreate a ticket
OasisTakeOfferModalWrapper
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
export class OasisTakeOfferModalWrapper extends PureComponent {
static takeOfferBtnLabel(offerTakeType, { buyToken, sellToken }) {
switch (offerTakeType) {
case TAKE_SELL_OFFER:
return `Buy ${buyToken}`;
- Create a ticketCreate a ticket
Function render
has 91 lines of code (exceeds 50 allowed). Consider refactoring. Open
render() {
const {
handleSubmit,
valid,
makeTransfer,
- Create a ticketCreate a ticket
Function loadGNTWrapUnwrapsHistoryEpic
has 88 lines of code (exceeds 50 allowed). Consider refactoring. Open
const loadGNTWrapUnwrapsHistoryEpic = (address, config) => async (
dispatch,
getState
) => {
const tokenName = TOKEN_GOLEM;
- Create a ticketCreate a ticket
SetTokenAllowanceTrustWrapper
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
export class SetTokenAllowanceTrustWrapper extends PureComponent {
constructor(props) {
super(props);
this.state = {
isToggleAllowanceTxPending: false
- Create a ticketCreate a ticket
Function render
has 79 lines of code (exceeds 50 allowed). Consider refactoring. Open
render() {
const {
valid,
handleSubmit,
initialized,
- Create a ticketCreate a ticket
Function render
has 78 lines of code (exceeds 50 allowed). Consider refactoring. Open
render() {
const {
valid,
handleSubmit,
unwrappedToken,
- Create a ticketCreate a ticket
Function loadEtherWrapUnwrapsHistoryEpic
has 78 lines of code (exceeds 50 allowed). Consider refactoring. Open
const loadEtherWrapUnwrapsHistoryEpic = (address, config) => async (
dispatch,
getState
) => {
dispatch(loadWrapUnwrapsHistory$.pending());
- Create a ticketCreate a ticket
Function loadContact
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function loadContact(abi, contractAddress, noProxy) {
try {
if (!web3.isAddress(contractAddress)) {
throw new Error({
msg: "contract address argument is not an valid ethereum address"
- Read upRead up
- Create a ticketCreate a ticket
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
File wrapUnwrap.js
has 503 lines of code (exceeds 500 allowed). Consider refactoring. Open
import { createAction, handleActions } from "redux-actions";
import { fromJS } from "immutable";
import { reset, formValueSelector, change } from "redux-form/immutable";
import {
- Create a ticketCreate a ticket
Function render
has 74 lines of code (exceeds 50 allowed). Consider refactoring. Open
render() {
const {
offerTakeType,
sellToken,
buyToken,
- Create a ticketCreate a ticket
Function render
has 73 lines of code (exceeds 50 allowed). Consider refactoring. Open
render() {
const { latestBlock: { number } = {} } = this.props;
return (
<section className={styles.LockedAccountSection}>
<div>
- Create a ticketCreate a ticket
Function render
has 72 lines of code (exceeds 50 allowed). Consider refactoring. Open
render() {
return (
<Line
height={CHART_HEIGHT}
data={{
- Create a ticketCreate a ticket
Function init
has 65 lines of code (exceeds 50 allowed). Consider refactoring. Open
const init = networkName => {
const tokencontractsDeploymentAdressessList = config["tokens"][networkName];
const marketDeploymentAddress = config["market"][networkName]["address"];
const WETH = loadContact(
- Create a ticketCreate a ticket
Function fetchAndSubscribeUserTradesHistoryEpic
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const fetchAndSubscribeUserTradesHistoryEpic = perActiveTradingPair => (
dispatch,
getState
) => {
if (
- Read upRead up
- Create a ticketCreate a ticket
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 doHashChange
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function doHashChange() {
// For now is the only currency on the left side
localStorage.setItem('quoteCurrency', 'W-ETH');
let quoteCurrency = null;
- Read upRead up
- Create a ticketCreate a ticket
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 tradeType
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const tradeType = (
order,
baseCurrency,
userToTradeBaseRelation,
userToTradeAdditionalRelation
- Read upRead up
- Create a ticketCreate a ticket
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 render
has 62 lines of code (exceeds 50 allowed). Consider refactoring. Open
render() {
const {
amount,
fullPrecisionAmount,
fullPrecisionUnit,
- Create a ticketCreate a ticket