Skip to content

Commit

Permalink
Figured out there was an extra field which shouldn't be there in Aird…
Browse files Browse the repository at this point in the history
…ropModal >.<
  • Loading branch information
mudrila committed Dec 21, 2024
1 parent 48e37ee commit 303722f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/components/ui/modals/AirdropModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useTranslation } from 'react-i18next';
import { Address, getAddress, isAddress } from 'viem';
import { usePublicClient } from 'wagmi';
import * as Yup from 'yup';
import { useValidationAddress } from '../../../hooks/schemas/common/useValidationAddress';
import { useFractal } from '../../../providers/App/AppProvider';
import { useDaoInfoStore } from '../../../store/daoInfo/useDaoInfoStore';
import { BigIntValuePair, TokenBalance } from '../../../types';
Expand Down Expand Up @@ -57,10 +56,7 @@ export function AirdropModal({
const fungibleAssetsWithBalance = assetsFungible.filter(asset => parseFloat(asset.balance) > 0);
const [nonceInput, setNonceInput] = useState<number | undefined>(safe!.nextNonce);

const { addressValidationTest, isValidating } = useValidationAddress();

const airdropValidationSchema = Yup.object().shape({
destinationAddress: Yup.string().test(addressValidationTest),
selectedAsset: Yup.object()
.shape({
tokenAddress: Yup.string().required(),
Expand Down Expand Up @@ -318,9 +314,7 @@ export function AirdropModal({
marginTop="2rem"
width="100%"
type="submit"
isDisabled={
isValidating || !!errors.recipients || !!errors.selectedAsset || isSubmitDisabled
}
isDisabled={!!errors.recipients || !!errors.selectedAsset || isSubmitDisabled}
>
{submitButtonText}
</Button>
Expand Down

0 comments on commit 303722f

Please sign in to comment.