Skip to content

Commit

Permalink
prevent purchase tx when sold out
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Oct 9, 2024
1 parent c9528e6 commit afcf68a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/purchase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ const Purchase = () => {
return;
}

if (saleInfo.coresOffered === saleInfo.coresSold) {
toastWarning('All cores have been sold out');
return;
}

if (currentPrice === undefined) {
toastWarning('Wait for the price to be fetched');
return;
Expand Down

0 comments on commit afcf68a

Please sign in to comment.