Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Apr 15, 2024
1 parent 18be627 commit e702156
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
10 changes: 9 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'react/display-name': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
//#region //*=========== Unused Import ===========
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modals/Unlist/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const UnlistModal = ({

const [working, setWorking] = useState(false);

const unlistRegion = async (region: Region) => {
const unlistRegion = async (_region: Region) => {
if (!api || !activeAccount) {
return;
}
Expand Down
10 changes: 3 additions & 7 deletions src/contexts/market/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useInkathon } from '@scio-labs/use-inkathon';
import React, {
createContext,
useCallback,
Expand All @@ -8,7 +7,6 @@ import React, {
} from 'react';

import { Listing } from '@/models';
import { useCommon } from '../common';

interface MarketData {
loading: boolean;
Expand All @@ -34,15 +32,13 @@ const MarketProvider = ({ children }: Props) => {
const [loading, setLoading] = useState(true);
const [listedRegions, setListedRegions] = useState<Array<Listing>>([]);

const context = useCommon();

const { api } = useInkathon();

const fetchMarket = useCallback(async () => {
// TODO

setLoading(false);
setListedRegions([]);
return [];
}, [api, context]);
}, []);

useEffect(() => {
fetchMarket();
Expand Down
4 changes: 2 additions & 2 deletions src/utils/crossChain/transfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { BN } from '@polkadot/util';
import { Sender, TxStatusHandlers } from '@/models';

import {
RegionXChain,
CoretimeChain,
CoretimeRegionFromRegionXPerspective,
CoretimeRegionFromCoretimePerspective,
CoretimeRegionFromRegionXPerspective,
RegionXChain,
} from './consts';
import { versionedNonfungibleAssetWrap, versionedWrap } from './utils';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { CoreMask, RegionId } from 'coretime-utils';
import Decimal from 'decimal.js';

import {
REGIONX_DECIMALS,
CORETIME_DECIMALS,
REGIONX_DECIMALS,
RELAY_CHAIN_BLOCK_TIME,
} from '@/models';

Expand Down

0 comments on commit e702156

Please sign in to comment.