Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve issue with max limit not increasing after GitHub connection #28

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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