Skip to content

Commit

Permalink
Merge pull request #41 from airswap/fix/build-action
Browse files Browse the repository at this point in the history
remove unused variables; update action for pages
  • Loading branch information
dmosites authored Aug 28, 2023
2 parents 9c93137 + 5fe3faa commit 111b962
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "build"
path: "dist"

- name: Deploy to GitHub Pages
id: deployment
Expand All @@ -53,7 +53,7 @@ jobs:
- name: IPFS Deploy
uses: aquiladev/ipfs-action@master
with:
path: ./build
path: ./dist
service: infura
infuraProjectId: ${{ secrets.INFURA_PROJECT_ID }}
infuraProjectSecret: ${{ secrets.INFURA_PROJECT_SECRET }}
5 changes: 1 addition & 4 deletions src/features/staking/StakingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { StatusStaking } from "./types/StakingTypes";
import { buttonStatusText } from "./utils/buttonStatusText";
import { modalHeadline } from "./utils/headline";
import { useTokenBalances } from "../../hooks/useTokenBalances";
import { format } from "@greypixel_/nicenumbers";

interface StakingModalInterface {
stakingModalRef: RefObject<HTMLDialogElement>;
Expand Down Expand Up @@ -59,7 +58,7 @@ const StakingModal: FC<StakingModalInterface> = ({
},
);

const { data: astAllowanceData, refetch: refetchAllowance } = useContractRead(
const { refetch: refetchAllowance } = useContractRead(
{
address: AirSwapToken.address,
abi: astAbi,
Expand Down Expand Up @@ -98,8 +97,6 @@ const StakingModal: FC<StakingModalInterface> = ({
},
});

const astAllowance = format(astAllowanceData, { tokenDecimals: 4 });

const needsApproval = +astBalance < +stakingAmount;

const handleClickApprove = useCallback(async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/features/votes/SetRootButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const SetRootButton = ({
alwaysUseDefault: false,
});

const { config, status: prepareWriteStatus } = usePrepareContractWrite({
const { config } = usePrepareContractWrite({
...airswapPool,
abi: AirSwapPoolAbi,
functionName: "enable",
Expand Down
2 changes: 0 additions & 2 deletions src/features/votes/hooks/useGroupClaimStatus.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useMemo } from "react";
import { useAccount } from "wagmi";
import { useGroupHash } from "./useGroupHash";
import { Proposal } from "./useGroupedProposals";
import { useUserVotes } from "./useUserVotes";

Expand All @@ -15,7 +14,6 @@ export const useGroupClaimStatus = ({
voterAddress?: `0x${string}`;
}) => {
const { address: connectedAccount } = useAccount();
const groupHash = useGroupHash(proposalGroup);
const address = _voterAddress || connectedAccount;

// Fetch all user votes.
Expand Down
11 changes: 1 addition & 10 deletions src/features/votes/hooks/useHasUserClaimedForGroup.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import { useAccount, useQuery } from "wagmi";
import { useQuery } from "wagmi";

export const useHasUserClaimerForGroup = ({
root,
voterAddress,
}: {
root: string;
voterAddress: string;
}) => {
const { address: connectedAccount } = useAccount();
const address = voterAddress || connectedAccount;

const fetch = () => {
return true;
};

// TODO: when we have the abi, this will be a `claimed(root, address)`
// useContractRead call.
return useQuery(["TODO: REMOVE"], {
Expand Down

0 comments on commit 111b962

Please sign in to comment.