From 9fd1614995d02faa385f923c7851f95cb6f637af Mon Sep 17 00:00:00 2001 From: Akira <156126180+akiraonstarknet@users.noreply.github.com> Date: Thu, 14 Nov 2024 19:25:40 +0530 Subject: [PATCH] Raffle page fixes, add ETH XL, etc. (#186) * raffle page text fixes * enable mobile actions * raffle::select winners:: add debug logs * raffle: add rt post link * add raffle know more link * Add dnmm reverse (#101) * temp remove tnc signing validation * add fetchWithRetry for external endpoints * fix haiko api bug * disable sithswap, 10kswap and starkdefi * build fix * re-add fee * add dnmm2 * Add mainnet ETH Sensei XL contracts * fix haiko api bug * fix haiko api url * Update og_nft_eligible_users.json * update og nft list [full] * Launch ETH XL (#102) * Add dnmm reverse (#101) * temp remove tnc signing validation * add fetchWithRetry for external endpoints * fix haiko api bug * disable sithswap, 10kswap and starkdefi * build fix * re-add fee * add dnmm2 * Add mainnet ETH Sensei XL contracts * fix haiko api bug * remove ETH XL * build fix * update eth xl address * update audit info on XL pool --- public/og_nft_eligible_users.json | 24 ++++--- src/app/api/raffle/luckyWinner/route.ts | 2 + src/app/raffle/_components/share-on-x.tsx | 2 +- src/app/raffle/page.tsx | 17 +++-- .../[strategyId]/_components/Strategy.tsx | 8 +-- src/components/Navbar.tsx | 4 +- src/components/TxButton.tsx | 2 - src/constants.ts | 23 ++++++- src/store/protocols.ts | 2 +- src/store/strategies.atoms.ts | 17 ++++- src/strategies/IStrategy.ts | 8 ++- src/strategies/auto_strk.strat.ts | 5 +- src/strategies/delta_neutral_mm.ts | 26 ++++--- src/strategies/delta_neutral_mm_2.ts | 68 +++++++++++++++++++ 14 files changed, 166 insertions(+), 42 deletions(-) create mode 100644 src/strategies/delta_neutral_mm_2.ts diff --git a/public/og_nft_eligible_users.json b/public/og_nft_eligible_users.json index a290965..a81f235 100644 --- a/public/og_nft_eligible_users.json +++ b/public/og_nft_eligible_users.json @@ -41,6 +41,7 @@ "0x1ca34f742a91a588a3e770c8c8c8618a0713d7f64fda7935d42dcfcf4adffa0", "0x571d4b6f5a34d7a43517d2eca4166804f753a643ec28bec0f51143bef50a9a6", "0x6a98eef8b1ce965ec9f6daf4c896f5c21217f2365652c30d462b13a1858ed7c", + "0x5d3a8f378500497479d3a16cfcd54657246dc37da8270b52e49319fac139939", "0x5105649f42252f79109356e1c8765b7dcdb9bf4a6a68534e7fc962421c7efd2", "0x36177b6741a43c219602ce857c18e445920d5a6ea5f4ee3a0240e8ae319bbf5", "0x47ccae4b7dccabd0689624812f7deeb3ed283dc3349b826974ff88107d71f4c", @@ -80,17 +81,22 @@ "0x4a2e0d92a5fbe6cce8c946e73f3e9d598268da80009a8382d6c9528d60b7422", "0x5e2ceca0361cc280ae6c67fcbc2bc8f1d052d81590ef730232f13d6ebf5fbd2", "0x3d0925e3d88cec40c818b5388fca09094bca0f3b2ee71c5d8459c79f6ead07", + "0x1e68b3ea811eabafc98c143c94b7694950d70d7802658c1b849664e9b6cefc2", "0x4e8c601e8f9542f2a66481ec03252d5ad75adaacf53a87075af3f7e51ccbf69", "0x2768d87d73919754122d5a66923d3da58a98e9e06ef2ccf27c4d0ff3b4ec2a8", "0x64fb7f85fd9dee10c313696b0aef1f4afc888ce8422edbc2f1695ec5ed152e9", + "0x17e5659a654067abdebb4123f4f729180de3b19e4a04b05bcceb862377fdf15", + "0x3bb0ee1ace26d86a9045872166f145dcb9ab4d37da9bdf76f6fe11ab129f0c8", + "0x6d1b40ae61ee3c2e794b9a5ff209d91c48e11618151260151b83813f3895faf", + "0x745fc3081d4e195e41c6c44fcb6a56d28d9d2fa683101cb2bc820bbeb7f91fd", + "0x58e058cc515404046b9a125531b92dfb9542b02829447381483520df7e7e39e", + "0x1f88cf149991c7768351fdf9c2bd80a56814a2b9a15e73e93c25d811b234f99", + "0x7c66aa1538776dde4329a24a92fb8ff668a43e64cb129bfda432902ea7450b1", + "0x7ec7d67d0e663c9ec4a45659b3db47f9ac594b40b9c91d24704dfe536277304", + "0x3a975ec9da67efdd15d2033a52108c328ce312cbb3ee8034420b24238715caa", + "0x53b36f0c83047272633c00db0f5db890dd4bec745446dc17dabbc6828e403a2", "0xb1ddd66dfd43f359706730088685770a2dc23ba097d56837d06efe6004247e", - "0x33d81412229469eb75ad178fd5cfdf37a439a5757f0a48878912aa7204d644c", - "0x3072de7549420ea000fdea27f8d2882d6179fa6c1967d0fda54e76eeaed7fd2", - "0x46f969a97eb52b8757522cb78996fd9b1c7fab996e63e8c4d481da7e6fac332", - "0x5aed32c092b4d597e524160d749c4ac4bfe38960693b79f3c407e9fdf6ec7f4", - "0x9f60931cd5bb85b19ed67011a4d0bbed126976ec708b201f30fa94562f5633", - "0x73698c80cd58d145a9900eb43240a0f85e3a4f24025b4b56c3480075d133f6b", - "0x551533735edca74e90d4b055a4987c89fde8f65a497c02d621e306b0ab7567d", - "0x109b84c85aa005a6f5ee1789f746693e72732e0fa4d3c9a3cac2eccff2299de", - "0x12ef68c3dd74994ea548cbe29def0335602dc40a752f66beaf18d769e2ff8d0" + "0x7e5dab3252f7b6340c268fc9f9687252cc85aaffdb932308a08909229f14dba", + "0x169b8a26ae1343047d853e22908e3da86ee5210daf2292a33aecfc269f7c05c", + "0x4fa35d249be21384b7c67912d29ec95dd289230ed7dcfdcb08b215bc5b77bfd" ] diff --git a/src/app/api/raffle/luckyWinner/route.ts b/src/app/api/raffle/luckyWinner/route.ts index e908b19..16f6004 100644 --- a/src/app/api/raffle/luckyWinner/route.ts +++ b/src/app/api/raffle/luckyWinner/route.ts @@ -6,7 +6,9 @@ export const dynamic = 'force-dynamic'; // static by default, unless reading the export async function GET(request: Request) { const authHeader = request.headers.get('authorization'); + console.log('Authorization header:', authHeader); if (authHeader !== `Bearer ${process.env.CRON_SECRET}`) { + console.error('Unauthorized request'); return new Response('Unauthorized', { status: 401, }); diff --git a/src/app/raffle/_components/share-on-x.tsx b/src/app/raffle/_components/share-on-x.tsx index ce18fd4..5723796 100644 --- a/src/app/raffle/_components/share-on-x.tsx +++ b/src/app/raffle/_components/share-on-x.tsx @@ -81,7 +81,7 @@ const ShareOnX = () => { {}} diff --git a/src/app/raffle/page.tsx b/src/app/raffle/page.tsx index 0b23bf9..15eca74 100644 --- a/src/app/raffle/page.tsx +++ b/src/app/raffle/page.tsx @@ -1,6 +1,7 @@ import { NextPage } from 'next'; import Image from 'next/image'; import React from 'react'; +import { Button } from '@chakra-ui/react'; import ActiveDeposits from './_components/active-deposits'; import RaffleTimer from './_components/raffle-timer'; @@ -21,9 +22,14 @@ const Raffle: NextPage = () => { during Starkspace (Devcon, Bangkok)
-3. You have to register if you want to participate. This mean you or - anyone on your behalf will be available t to collect the merch.{' '} + anyone on your behalf will be available to collect the merch.{' '}
4. The rewards will be in the form of exclusive merch reserved for you
5. Selected winners can collect their merch on 13th Nov, from The Fig - lobby, Bangkok + Lobby, Bangkok
- 6. Winners will be announced on our socials everyday + 6. Winners will be announced on our socials (i.e. X, TG, etc.) + everyday
diff --git a/src/app/strategy/[strategyId]/_components/Strategy.tsx b/src/app/strategy/[strategyId]/_components/Strategy.tsx index 25de2ad..be36926 100755 --- a/src/app/strategy/[strategyId]/_components/Strategy.tsx +++ b/src/app/strategy/[strategyId]/_components/Strategy.tsx @@ -46,8 +46,6 @@ import { import { StrategyParams } from '../page'; import MyNumber from '@/utils/MyNumber'; import { ExternalLinkIcon } from '@chakra-ui/icons'; -import { isMobile } from 'react-device-detect'; -import CONSTANTS from '@/constants'; const Strategy = ({ params }: StrategyParams) => { const { address } = useAccount(); @@ -247,9 +245,7 @@ const Strategy = ({ params }: StrategyParams) => { ) == 0 ? '-' : `${balData.data.amount.toEtherToFixedDecimals(balData.data.tokenInfo?.displayDecimals || 2)} ${balData.data.tokenInfo?.name}` - : isMobile - ? CONSTANTS.MOBILE_MSG - : 'Connect wallet'} + : 'Connect wallet'}