Skip to content

Commit

Permalink
Merge pull request #28 from rahulbarmann/rahulbarmann/fix#27
Browse files Browse the repository at this point in the history
fix: resolve issue with max limit not increasing after GitHub connection
  • Loading branch information
Woody4618 authored Jan 3, 2025
2 parents 935c0a1 + e040a21 commit 4ad76c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/AirdropForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export const AirdropForm = ({ className, rateLimit }: AirdropFormProps) => {
const [network, setSelectedNetwork] = useState("devnet");
const [isFormValid, setIsFormValid] = useState(false);

if (rateLimit.maxAmountPerRequest > 5) {
amountOptions.push(rateLimit.maxAmountPerRequest);
}

const validateWallet = (address: string): boolean => {
try {
new PublicKey(address);
Expand Down Expand Up @@ -176,7 +180,7 @@ export const AirdropForm = ({ className, rateLimit }: AirdropFormProps) => {
setIsFormValid(
walletAddress !== "" &&
amount !== null &&
amount <= 5 &&
amount <= 10 &&
errors.wallet === "" &&
errors.amount === "",
);
Expand Down

0 comments on commit 4ad76c0

Please sign in to comment.