diff --git a/ui/.env b/ui/.env index f659147e8..be3cc660f 100644 --- a/ui/.env +++ b/ui/.env @@ -1,6 +1,6 @@ NEXT_PUBLIC_NETWORK="mainnet" NEXT_PUBLIC_TOURNAMENT_ENDED="true" -NEXT_PUBLIC_SEASON_ACTIVE="false" -NEXT_PUBLIC_DS_TOURNAMENT_ACTIVE="true" +NEXT_PUBLIC_SEASON_ACTIVE="true" +NEXT_PUBLIC_DS_TOURNAMENT_ACTIVE="false" NEXT_PUBLIC_DS_TOURNAMENT_ID=1 NEXT_PUBLIC_DS_TOURNAMENT_START_TIME=1737727200 \ No newline at end of file diff --git a/ui/src/app/components/start/CreateAdventurer.tsx b/ui/src/app/components/start/CreateAdventurer.tsx index e09d11815..a6ee7ff1a 100644 --- a/ui/src/app/components/start/CreateAdventurer.tsx +++ b/ui/src/app/components/start/CreateAdventurer.tsx @@ -144,16 +144,23 @@ export const CreateAdventurer = ({ return ( <> {step == 1 && ( -
+
{seasonActive ? (

- Enter Season 0 + Opus Season 1

- Introducing onchain seasons for Loot Survivor. This is the first - weekly season with a prize pool of: + We've teamed up with Opus to sponsor on-chain tournaments + with $CASH prizes.{" "} + + Visit Opus +

+

Ends 17/02 14:00 UTC

{tournamentPrizes && ( { const formattedPrizes = prizes.lsTournamentsV0TournamentPrizeModels.edges; - const [lordsDollar, setLordsDollar] = useState(0n); + // const [lordsDollar, setLordsDollar] = useState(0n); - const handleLordsDollarValue = async () => { - const value = await lordsDollarValue(); - setLordsDollar(value); - }; + // const handleLordsDollarValue = async () => { + // const value = await lordsDollarValue(); + // setLordsDollar(value); + // }; - useEffect(() => { - handleLordsDollarValue(); - }, []); + // useEffect(() => { + // handleLordsDollarValue(); + // }, []); return ( <> @@ -41,7 +39,7 @@ const Prizes = ({ prizes, lordsDollarValue }: Prizes) => { return (
{prizes.map((prize: any, index: any) => { const isERC20 = variant === "erc20"; @@ -52,39 +50,42 @@ const Prizes = ({ prizes, lordsDollarValue }: Prizes) => { ); return ( - -
- {prize.payout_position <= 3 && ( - - - - )} -

- {prize.payout_position} - - {getOrdinalSuffix(prize.payout_position).slice(1)} - -

-
- - - - - $ - {( - (tokenValue * Number(lordsDollar)) / - 10 ** 8 / - 10 ** 18 - ).toFixed(2)} + <> + {index > 0 && ( +
+ )} + +
+ {prize.payout_position <= 3 && ( + + + + )} +

+ {prize.payout_position} + + {getOrdinalSuffix(prize.payout_position).slice(1)} + +

+
+ - + {/* */} + + ${tokenValue / 10 ** 18} +
- + ); })}
diff --git a/ui/src/app/components/start/SeasonDetails.tsx b/ui/src/app/components/start/SeasonDetails.tsx index 420d970f1..d0a7001e5 100644 --- a/ui/src/app/components/start/SeasonDetails.tsx +++ b/ui/src/app/components/start/SeasonDetails.tsx @@ -19,7 +19,7 @@ const SeasonTable = ({ prizes, lordsValue }: SeasonDetailsProps) => {

- Season 0 Pool + Opus Season 1

@@ -34,12 +34,8 @@ const SeasonTable = ({ prizes, lordsValue }: SeasonDetailsProps) => {

$ - {( - (formattedPrizes[0].node.token_data_type.erc20?.token_amount * - Number(lordsValue)) / - 10 ** 8 / - 10 ** 18 - ).toFixed(2)} + {formattedPrizes[0].node.token_data_type.erc20?.token_amount / + 10 ** 18}

@@ -56,12 +52,8 @@ const SeasonTable = ({ prizes, lordsValue }: SeasonDetailsProps) => {

$ - {( - (formattedPrizes[1].node.token_data_type.erc20?.token_amount * - Number(lordsValue)) / - 10 ** 8 / - 10 ** 18 - ).toFixed(2)} + {formattedPrizes[1].node.token_data_type.erc20?.token_amount / + 10 ** 18}

@@ -78,17 +70,14 @@ const SeasonTable = ({ prizes, lordsValue }: SeasonDetailsProps) => {

$ - {( - (formattedPrizes[2].node.token_data_type.erc20?.token_amount * - Number(lordsValue)) / - 10 ** 8 / - 10 ** 18 - ).toFixed(2)} + {formattedPrizes[2].node.token_data_type.erc20?.token_amount / + 10 ** 18}

+ ... more! ); }; diff --git a/ui/src/app/lib/networkConfig.ts b/ui/src/app/lib/networkConfig.ts index 153204294..094e92cff 100644 --- a/ui/src/app/lib/networkConfig.ts +++ b/ui/src/app/lib/networkConfig.ts @@ -67,7 +67,7 @@ export const networkConfig = { rendererAddress: "0x0", tournamentAddress: "0x3347382d530ff6acb9283ac1d78471187aae8a4690e9316bb4e3c3365ff7a86", - tournamentId: "0x1", + tournamentId: "0x4", appUrl: "https://lootsurvivor.io/", tournamentAppUrl: "https://tournaments.lootsurvivor.io/", beastsViewer: diff --git a/ui/src/app/lib/utils/syscalls.ts b/ui/src/app/lib/utils/syscalls.ts index f93548448..6a2b420e7 100644 --- a/ui/src/app/lib/utils/syscalls.ts +++ b/ui/src/app/lib/utils/syscalls.ts @@ -1658,17 +1658,17 @@ export function createSyscalls({ const randomInt = getRandomInt(0, revenueAddresses.length - 1); const selectedRevenueAddress = revenueAddresses[randomInt]; + const tournamentId = networkConfig[network!].tournamentId; + const enterTournamentTx = { contractAddress: tournamentContractAddress, entrypoint: "enter_tournament", calldata: CallData.compile([ - networkConfig[network!].tournamentId, + tournamentId, new CairoOption(CairoOptionVariant.None), ]), }; - const tournamentId = networkConfig[network!].tournamentId; - const startTournamentTx = { contractAddress: tournamentContractAddress, entrypoint: "start_tournament", @@ -1709,7 +1709,7 @@ export function createSyscalls({ freeVRF, (costToPlay ?? 0) + (seasonCost ?? 0), goldenTokenId, - blobertTokenId + goldenTokenId !== "0" ? "0" : blobertTokenId ); }