Skip to content

Commit

Permalink
Fixup traits for ducks frens
Browse files Browse the repository at this point in the history
  • Loading branch information
wraitii committed Apr 12, 2024
1 parent 68c9dd7 commit 605abaa
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/collections/MassMint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,10 @@ const checkShapeContract = async (name: string) => {
}
const storeOneObject = async () => {
let family = '';
let season = '3';
let customTraits = collection.value === 'ducks_everywhere' ? {
Family: '',
Season: '3',
} : { Collection: '' };
const tasks = [
importJsons,
() => importPreviews('preview_b64'),
Expand All @@ -394,13 +396,12 @@ const storeOneObject = async () => {
const traits = await pushModal(RecipientMappingModal, {
initialMapping: {
serial_number: '' + (Object.keys(existingItems.value?.[collection.value] ?? {}).length + 1),
Family: family,
Season: season,
...customTraits,
},
}) as Record<string, string>;
setsToMint.value[0]._data!.attribute_id = traits.serial_number;
family = traits.Family;
season = traits.Season;
for (const key in customTraits)
customTraits[key] = traits?.[key];
},
async () => {
await Promise.all((await storeObjects()).map(x => x.task._fetch));
Expand All @@ -409,8 +410,7 @@ const storeOneObject = async () => {
return await adminBackendManager.post(`v1/admin/update_traits/${getCurrentNetwork()}/${collection.value}`, {
data: {
[setsToMint.value[0]._data!.data.name]: {
Family: family,
Season: season,
...customTraits,
},
},
});
Expand Down

0 comments on commit 605abaa

Please sign in to comment.