Skip to content

Commit 2ae404d

Browse files
committed
[Dashboard] Parse ENS value to evm address on uploading snapshots (#5518)
dash-472
1 parent 480fb4e commit 2ae404d

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/snapshot-upload.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,16 @@ export const SnapshotUpload: React.FC<SnapshotUploadProps> = ({
6868
const paginationPortalRef = useRef<HTMLDivElement>(null);
6969

7070
const onSave = () => {
71-
setSnapshot(normalizeQuery.data.result);
71+
// Make sure we are not passing ENS values to the claim-condition extension
72+
// we should use the `resolvedAddress` value instead
73+
setSnapshot(
74+
normalizeQuery.data.result.map((o) => ({
75+
address: o.resolvedAddress,
76+
maxClaimable: o.maxClaimable,
77+
price: o.price,
78+
currencyAddress: o.currencyAddress,
79+
})),
80+
);
7281
setOpenSnapshotIndex(-1);
7382
};
7483

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-upload.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ export const AirdropUpload: React.FC<AirdropUploadProps> = ({
4545
} = useCsvUpload<AirdropAddressInput>({ csvParser });
4646
const paginationPortalRef = useRef<HTMLDivElement>(null);
4747
const onSave = () => {
48-
setAirdrop(normalizeQuery.data.result);
48+
setAirdrop(
49+
normalizeQuery.data.result.map((o) => ({
50+
address: o.resolvedAddress,
51+
quantity: o.quantity,
52+
})),
53+
);
4954
onClose();
5055
};
5156

0 commit comments

Comments
 (0)