Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
alimaktabi committed Sep 22, 2024
2 parents 8d4c015 + 5157dd0 commit 6b84043
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
20 changes: 10 additions & 10 deletions components/containers/token-tap/Modals/ClaimModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ const ClaimTokenModalBody = ({
if (selectedTokenForClaim.isExpired)
return <MaxedOutBody token={selectedTokenForClaim} />;

if (
claimTokenResponse?.state === "Pending" ||
collectedToken?.status === "Pending"
) {
return <InitialBody token={selectedTokenForClaim} />;
}

if (selectedTokenForClaim.isMaxedOut)
return <MaxedOutBody token={selectedTokenForClaim} />;

if (method === "requirements") {
return <TokenRequirementModal token={selectedTokenForClaim} />;
}
Expand All @@ -119,16 +129,6 @@ const ClaimTokenModalBody = ({
/>
);

if (
claimTokenResponse?.state === "Pending" ||
collectedToken?.status === "Pending"
) {
return <InitialBody token={selectedTokenForClaim} />;
}

if (selectedTokenForClaim.isMaxedOut)
return <MaxedOutBody token={selectedTokenForClaim} />;

if (!isPermissionsVerified)
return (
<TokenPermissions
Expand Down
4 changes: 2 additions & 2 deletions components/containers/token-tap/TokenCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ const TokenCard: FC<{ token: Token; isHighlighted?: boolean }> = ({
</ClaimButton>
) : isExpired || token.isMaxedOut ? (
<ClaimButton
className="pointer-events-none !bg-g-dark-primary-gradient"
className="!bg-g-dark-primary-gradient before:!bg-g-dark-primary-gradient"
$mlAuto
onClick={() => openClaimModal(token)}
$fontSize="13px"
Expand All @@ -299,7 +299,7 @@ const TokenCard: FC<{ token: Token; isHighlighted?: boolean }> = ({
)
) : isExpired || token.isMaxedOut ? (
<ClaimButton
className="pointer-events-none !bg-g-dark-primary-gradient"
className="!bg-g-dark-primary-gradient before:!bg-g-dark-primary-gradient"
$mlAuto
onClick={() => openClaimModal(token)}
$fontSize="13px"
Expand Down
19 changes: 9 additions & 10 deletions utils/wallet/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@ import { supportedChains } from "@/constants/chains";
import { injected, mock, safe, walletConnect } from "wagmi/connectors";

import { HttpTransport } from "viem";
import { TEST_PRIVATE_KEY } from "@/cypress/utils/data";

const getConnectorProviders = () => {
if (process.env.NEXT_PUBLIC_IS_TESTING === "1") {
// const account = privateKeyToAccount(TEST_PRIVATE_KEY);
const connectors = [
mock({
accounts: [TEST_PRIVATE_KEY],
}),
];
// if (process.env.NEXT_PUBLIC_IS_TESTING === "1") {
// // const account = privateKeyToAccount(TEST_PRIVATE_KEY);
// const connectors = [
// mock({
// accounts: [TEST_PRIVATE_KEY],
// }),
// ];

return connectors;
}
// return connectors;
// }

return [
injected({
Expand Down

0 comments on commit 6b84043

Please sign in to comment.