Skip to content

Commit

Permalink
Disable mint before airdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
Matth26 committed Nov 30, 2024
1 parent 94afcd9 commit 4828bbf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions client/src/dojo/game/models/mint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,14 @@ export class Mint {
this.number = mint.number;
this.expiration_timestamp = mint.expiration_timestamp;
}

// Static method to create a Mint instance from an ID string
// used to 0 mint before airdrop
public static fromId(player_id: string | undefined): Mint {
return new Mint({
player_id: player_id || "",
number: 0,
expiration_timestamp: 1735544192,
});
}
}
2 changes: 1 addition & 1 deletion client/src/hooks/useFreeMint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export const useFreeMint = ({
return component ? new MintClass(component) : null;
}, [component]);

return mint;
return MintClass.fromId(player_id); // mint;
};
2 changes: 1 addition & 1 deletion client/src/ui/screens/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const Home = () => {

useEffect(() => {
const clause: torii.MemberClause = {
model: "zkube-Mint2",
model: "zkube-Mint",
member: "id",
operator: "Eq",
value: {
Expand Down

0 comments on commit 4828bbf

Please sign in to comment.