Skip to content

Commit

Permalink
fix: review and lint stuff
Browse files Browse the repository at this point in the history
Signed-off-by: clegirar <[email protected]>
  • Loading branch information
clegirar committed Sep 22, 2023
1 parent 01beca9 commit 6b173de
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,4 @@ networks.json: node_modules validate-networks
.PHONY: unused-exports
unused-exports: node_modules
## TODO unexclude all paths except packages/api;packages/contracts-clients;packages/evm-contracts-clients
npx ts-unused-exports ./tsconfig.json --excludePathsFromReport="packages/api;packages/contracts-clients;packages/evm-contracts-clients;packages/components/socialFeed/RichText/inline-toolbar;.*\.web|.electron|.d.ts" --ignoreTestFiles
npx ts-unused-exports ./tsconfig.json --excludePathsFromReport="packages/api;packages/contracts-clients;packages/evm-contracts-clients;packages/components/socialFeed/RichText/inline-toolbar;./App.tsx;.*\.web|.electron|.d.ts" --ignoreTestFiles
2 changes: 1 addition & 1 deletion packages/components/navigation/Navigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { RiotGameInventoryScreen } from "../../screens/RiotGame/RiotGameInventor
import { RiotGameLeaderboardScreen } from "../../screens/RiotGame/RiotGameLeaderboardScreen";
import { RiotGameMarketplaceScreen } from "../../screens/RiotGame/RiotGameMarketplaceScreen";
import { RiotGameMemoriesScreen } from "../../screens/RiotGame/RiotGameMemoriesScreen";
import { RiotGameScreen } from "../../screens/RiotGame/RiotGameScreen.web";
import { RiotGameScreen } from "../../screens/RiotGame/RiotGameScreen";
import { RiotersFooterScreen } from "../../screens/RiotersFooter/RiotersFooterScreen";
import { SettingsScreen } from "../../screens/Settings/SettingsScreen";
import { StakeScreen } from "../../screens/Stake";
Expand Down
5 changes: 3 additions & 2 deletions packages/components/socialFeed/SocialActions/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import { layout } from "../../../utils/style/layout";
import { IconBox } from "../../IconBox";
import { SocialButton } from "../../buttons/SocialButton";
import ModalBase from "../../modals/ModalBase";
interface FeedPostShareModalProps {

interface ShareButtonProps {
postId: string;
}

export const ShareButton = ({ postId }: FeedPostShareModalProps) => {
export const ShareButton = ({ postId }: ShareButtonProps) => {
const [isModalVisible, setIsModalVisible] = useState(false);

const SOCIAL_BUTTONS = [
Expand Down
2 changes: 0 additions & 2 deletions packages/networks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Decimal } from "@cosmjs/math";
import { Registry } from "@cosmjs/proto-signing";
import {
SigningStargateClient,
StargateClient,
GasPrice,
defaultRegistryTypes,
} from "@cosmjs/stargate";
Expand All @@ -28,7 +27,6 @@ import { teritoriNetwork } from "./teritori";
import { teritoriTestnetNetwork } from "./teritori-testnet";
import {
CosmosNetworkInfo,
CurrencyInfo,
EthereumNetworkInfo,
GnoNetworkInfo,
NativeCurrencyInfo,
Expand Down
40 changes: 40 additions & 0 deletions packages/screens/DAppStore/apps/toripunks/query/useHistoryData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { useQuery } from "@tanstack/react-query";

import { historyData } from "./userHistoryMock";

Check failure on line 3 in packages/screens/DAppStore/apps/toripunks/query/useHistoryData.ts

View workflow job for this annotation

GitHub Actions / lint-and-build

'historyData' is defined but never used
import { Wallet } from "../../../../../context/WalletsProvider";

export const useMyHistoryData = ({
selectedWallet,
}: {
selectedWallet?: Wallet;
}) => {
const addr = selectedWallet?.address || "";
const date = "2023-04-14"; //new Date().toISOString().slice(0, 10);
const { data, refetch } = useQuery(
["history", addr],
async () => {
if (addr) {
const response = await fetch(
`https://api.roulette.aaa-metahuahua.com/tickets?addr=${addr}&date=${date}`
);
return response.json();
}
return [];
},
{
initialData: [
{
date: "00/0000",
tickets: {
bought: 0,
won: 0,
},
toriWon: 0,
},
],
refetchOnMount: false,
enabled: false,
}
);
return { data, refetch };
};
19 changes: 19 additions & 0 deletions packages/screens/DAppStore/apps/toripunks/query/userHistoryMock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
interface HistoryItem {
round: string;
tickets: {
bought: number;
won: number;
};
toriWon: number;
}

export const historyData: HistoryItem[] = [
{
round: "loading",
tickets: {
bought: 0,
won: 0,
},
toriWon: 0,
},
];
1 change: 0 additions & 1 deletion packages/store/slices/marketplaceFilters.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
createEntityAdapter,
createSlice,
EntityId,
PayloadAction,
} from "@reduxjs/toolkit";

Expand Down
2 changes: 1 addition & 1 deletion packages/store/store.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import AsyncStorage from "@react-native-async-storage/async-storage";
import { combineReducers, configureStore } from "@reduxjs/toolkit";
import { useDispatch } from "react-redux";
import { persistStore, persistReducer } from "redux-persist";
import { persistReducer } from "redux-persist";

import { dAppsReducer, dAppsReducerPersisted } from "./slices/dapps-store";
import {
Expand Down
1 change: 0 additions & 1 deletion packages/utils/gno.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { GnoJSONRPCProvider } from "@gnolang/gno-js-client";

import { Status } from "../contracts-clients/dao-proposal-single/DaoProposalSingle.types";
import { mustGetGnoNetwork } from "../networks";

interface AdenaDoContractMessage {
Expand Down
4 changes: 0 additions & 4 deletions packages/utils/text.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import React, { ComponentType } from "react";

import { DEFAULT_USERNAME } from "./social-feed";

export const capitalize = (s: string) =>
(s && s[0].toUpperCase() + s.slice(1)) || "";

Expand Down

0 comments on commit 6b173de

Please sign in to comment.