Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
arjanjohan committed Jul 10, 2024
1 parent 09ad24d commit d55245b
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 12 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ For this hackathon I kept the scope small due to the time constraints. I build o


- Debug page
- Msg for no result on view methods + error msg
- Msg for no result on view methods
- Styling for Resources tab
- Fix vercel error in Resources tab
- Group contracts under address in liss
- Fix colors for dark mode
- Ensure export default deployedContracts satisfies GenericContractsDeclaration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { encodeInputArgsForViewRequest } from "../../../../utils/utils";
import { parseTypeTag } from "@aptos-labs/ts-sdk";
import { InputTransactionData, useWallet } from "@aptos-labs/wallet-adapter-react";
import { Types } from "aptos";
// import { useGlobalState } from "../../../../global-config/GlobalConfig";
import { displayTxResult } from "~~/app/debug/_components/contract";
import { view } from "~~/hooks";
import useSubmitTransaction from "~~/hooks/scaffold-move/useSubmitTransaction";
Expand Down
2 changes: 0 additions & 2 deletions packages/nextjs/hooks/scaffold-move/useGetAccountModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import { ResponseError } from "../client";
import { UseQueryResult, useQuery } from "@tanstack/react-query";
import { Types } from "aptos";

// import {useGlobalState} from "../../global-config/GlobalConfig";

export function useGetAccountModules(address: string): UseQueryResult<Types.MoveModuleBytecode[], ResponseError> {
// const [state] = useGlobalState();
const state = { network_value: "https://aptos.devnet.m1.movementlabs.xyz" };

return useQuery<Array<Types.MoveModuleBytecode>, ResponseError>({
Expand Down
2 changes: 0 additions & 2 deletions packages/nextjs/hooks/scaffold-move/useGetAccountResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ import { ResponseError } from "../client";
import { UseQueryResult, useQuery } from "@tanstack/react-query";
import { Types } from "aptos";

// import {useGlobalState} from "../../global-config/GlobalConfig";

export function useGetAccountResources(
address: string,
options?: {
retry?: number | boolean;
},
): UseQueryResult<Types.MoveResource[], ResponseError> {
// const [state] = useGlobalState();
const state = { network_value: "https://aptos.devnet.m1.movementlabs.xyz" };

const test = useQuery<Array<Types.MoveResource>, ResponseError>({
Expand Down
3 changes: 0 additions & 3 deletions packages/nextjs/hooks/scaffold-move/useGraphqlClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useEffect, useState } from "react";
import { Network, NetworkName } from "../../constants";
import { ApolloClient, ApolloProvider, HttpLink, InMemoryCache, NormalizedCacheObject } from "@apollo/client";

// import {useGlobalState} from "../../global-config/GlobalConfig";

function getIsGraphqlClientSupportedFor(networkName: NetworkName): boolean {
const graphqlUri = getGraphqlURI(networkName);
Expand Down Expand Up @@ -37,7 +36,6 @@ function getGraphqlClient(networkName: NetworkName): ApolloClient<NormalizedCach
}

export function useGetGraphqlClient() {
// const [state] = useGlobalState();
const state = { network_name: Network.DEVNET, network_value: "https://aptos.devnet.m1.movementlabs.xyz" };

const [graphqlClient, setGraphqlClient] = useState<ApolloClient<NormalizedCacheObject>>(
Expand All @@ -62,7 +60,6 @@ export function GraphqlClientProvider({ children }: GraphqlClientProviderProps)
}

export function useGetIsGraphqlClientSupported(): boolean {
// const [state] = useGlobalState();
const state = { network_name: Network.DEVNET, network_value: "https://aptos.devnet.m1.movementlabs.xyz" };

const [isGraphqlClientSupported, setIsGraphqlClientSupported] = useState<boolean>(
Expand Down
2 changes: 0 additions & 2 deletions packages/nextjs/hooks/scaffold-move/useSubmitTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useEffect, useState } from "react";
import { InputTransactionData, useWallet } from "@aptos-labs/wallet-adapter-react";
import { FailedTransactionError } from "aptos";
import { useTargetNetwork } from "~~/hooks/scaffold-move/useTargetNetwork";
// import {useGlobalState} from "../../global-config/GlobalConfig";
import { aptosClient } from "~~/utils/scaffold-move/aptosClient";

export type TransactionResponse = TransactionResponseOnSubmission | TransactionResponseOnError;
Expand All @@ -24,7 +23,6 @@ export type TransactionResponseOnError = {
const useSubmitTransaction = () => {
const [transactionResponse, setTransactionResponse] = useState<TransactionResponse | null>(null);
const [transactionInProcess, setTransactionInProcess] = useState<boolean>(false);
// const [state] = useGlobalState();

// const network = useTargetNetwork();
const aptos = aptosClient("m1_devnet");
Expand Down

0 comments on commit d55245b

Please sign in to comment.