From d5421311c5ed893117099e62a83a6e713bdb023d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 12:09:19 +0330 Subject: [PATCH 01/12] Bump micromatch from 4.0.5 to 4.0.8 (#96) Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8. - [Release notes](https://github.com/micromatch/micromatch/releases) - [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md) - [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8) --- updated-dependencies: - dependency-name: micromatch dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5b6d747e..e20f7233 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2867,7 +2867,14 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.2, braces@~3.0.2: +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -4408,6 +4415,13 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + filter-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" @@ -6042,11 +6056,11 @@ micromark@^4.0.0: micromark-util-types "^2.0.0" micromatch@^4.0.4, micromatch@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: - braces "^3.0.2" + braces "^3.0.3" picomatch "^2.3.1" mime-db@1.52.0: From cd877fcaf6c35a3d015041f72dbdc6302ac76d38 Mon Sep 17 00:00:00 2001 From: Ali Maktabi Date: Tue, 3 Sep 2024 11:26:41 +0330 Subject: [PATCH 02/12] fixed api pathing errors --- context/index.tsx | 13 +++++-------- utils/api/index.ts | 2 +- utils/serverApis/contributionHub.ts | 11 ++++------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/context/index.tsx b/context/index.tsx index c622619b..1d15d2f9 100644 --- a/context/index.tsx +++ b/context/index.tsx @@ -19,15 +19,12 @@ export const UnitapProvider: FC = async ({ children }) => { try { if (cookieStorage.has("userToken")) - authProfile = await serverFetch( - `${process.env.NEXT_PUBLIC_API_URL}/api/auth/user/info/`, - { - headers: { - Authorization: `Token ${cookieStorage.get("userToken")?.value}`, - }, - cache: "no-store", + authProfile = await serverFetch(`/api/auth/user/info/`, { + headers: { + Authorization: `Token ${cookieStorage.get("userToken")?.value}`, }, - ); + cache: "no-store", + }); } catch {} const settings: Settings = settingsRes.reduce((prev, curr) => { diff --git a/utils/api/index.ts b/utils/api/index.ts index 3773a2aa..e2a99ba4 100644 --- a/utils/api/index.ts +++ b/utils/api/index.ts @@ -11,7 +11,7 @@ export const serverFetch = async (url: string, init?: RequestInit) => { // @ts-ignore init.headers.backend_service_key = process.env.BACKEND_SERVICE_KEY; // @ts-ignore - init.headers.Cookie = `backend_service_key=${process.env.BACKEND_SERVICE_KEY};`; + // init.headers.Cookie = `backend_service_key=${process.env.BACKEND_SERVICE_KEY};`; } const res = await fetch(process.env.NEXT_PUBLIC_API_URL! + url, { diff --git a/utils/serverApis/contributionHub.ts b/utils/serverApis/contributionHub.ts index 445fd124..8959329e 100644 --- a/utils/serverApis/contributionHub.ts +++ b/utils/serverApis/contributionHub.ts @@ -7,14 +7,11 @@ import { serverFetch } from "../api"; export const getUserRaffleListServerSide = async (token?: string) => { if (!token) return []; - const res = await serverFetch( - process.env.NEXT_PUBLIC_API_URL! + "/api/prizetap/get-user-raffles/", - { - headers: { - Authorization: `token ${token}`, - }, + const res = await serverFetch("/api/prizetap/get-user-raffles/", { + headers: { + Authorization: `token ${token}`, }, - ); + }); if (!Array.isArray(res)) return []; From 727508a7f52b97d2ac6d053e6d6d455a5628ff2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:28:03 +0330 Subject: [PATCH 03/12] Bump braces from 3.0.2 to 3.0.3 (#95) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ali Maktabi <67747298+alimaktabi@users.noreply.github.com> --- yarn.lock | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index e20f7233..ada6cb2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2867,20 +2867,13 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.3: +braces@^3.0.2, braces@~3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: fill-range "^7.1.1" -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" @@ -4408,10 +4401,10 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" From d156af8aad884cab29712695a69b62910ae0f766 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:29:01 +0330 Subject: [PATCH 04/12] Bump axios from 1.6.1 to 1.7.4 (#93) Bumps [axios](https://github.com/axios/axios) from 1.6.1 to 1.7.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.6.1...v1.7.4) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index b97ae564..989567bd 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@solana/web3.js": "^1.89.1", "@tanstack/react-query": "^5.17.12", "@uniswap/sdk-core": "^4.0.9", - "axios": "^1.5.1", + "axios": "^1.7.4", "big.js": "^6.2.1", "bigint-buffer": "^1.1.5", "bignumber.js": "^9.1.2", diff --git a/yarn.lock b/yarn.lock index ada6cb2d..43b3829c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2708,12 +2708,12 @@ axios@^0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" -axios@^1.5.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.1.tgz#76550d644bf0a2d469a01f9244db6753208397d7" - integrity sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g== +axios@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.4.tgz#4c8ded1b43683c8dd362973c393f3ede24052aa2" + integrity sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw== dependencies: - follow-redirects "^1.15.0" + follow-redirects "^1.15.6" form-data "^4.0.0" proxy-from-env "^1.1.0" @@ -4463,10 +4463,10 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== -follow-redirects@^1.14.9, follow-redirects@^1.15.0: - version "1.15.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" - integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== +follow-redirects@^1.14.9, follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== for-each@^0.3.3: version "0.3.3" From ac613551020d83babd0dc673a1dfde3574526546 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:30:46 +0330 Subject: [PATCH 05/12] Bump @solana/web3.js from 1.89.1 to 1.89.2 (#92) * Dev (#97) * get signature and enroll in raffle in boost modal * add Glm stacking constraint * sort twitter addresses * removed chain from glm staking added logo for glm app * fixed wallet connections * fixed integration logo * add git coin passport requirement * add logo and fixed bug * fixed cloudflare verification * modified rendering condiftion for catpcha * added raffle status after enroll * updated fetching requirements data logic * updated getting signature to use cloudflare token fixed refresh requirements error * Update app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --------- Co-authored-by: abbasnosrati Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * Dev (#98) * added zora requirement * fixed errors and bugs * Update index.ts * Bump @solana/web3.js from 1.89.1 to 1.89.2 Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 1.89.1 to 1.89.2. - [Release notes](https://github.com/solana-labs/solana-web3.js/releases) - [Commits](https://github.com/solana-labs/solana-web3.js/commits) --- updated-dependencies: - dependency-name: "@solana/web3.js" dependency-type: direct:production ... Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: Ali Maktabi <67747298+alimaktabi@users.noreply.github.com> Co-authored-by: abbasnosrati Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Co-authored-by: Ali Maktabi Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .env | 4 ++-- package.json | 2 +- yarn.lock | 35 +++++++---------------------------- 3 files changed, 10 insertions(+), 31 deletions(-) diff --git a/.env b/.env index 824ea75f..7dc25f34 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ -NEXT_PUBLIC_API_URL=https://stage.unitap.app +NEXT_PUBLIC_API_URL=https://api.unitap.app NEXT_PUBLIC_GOOGLE_ANALYTICS='G-HHTJ4P5ZB0' # API_URL=https://api.unitap.app @@ -7,7 +7,7 @@ NEXT_PUBLIC_GOOGLE_ANALYTICS='G-HHTJ4P5ZB0' NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID="31516b299852311acdc936c61cd7892c" -NEXT_PUBLIC_IS_STAGE=1 +NEXT_PUBLIC_IS_STAGE=0 SOLANA_HTTP_PROVIDER="https://fragrant-intensive-patina.solana-mainnet.quiknode.pro/08a6330aa4eb2bbad964ee86b9a271fdb5e8a7ad/" diff --git a/package.json b/package.json index 989567bd..751d88bf 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@hcaptcha/react-hcaptcha": "^1.11.0", "@metamask/logo": "^3.1.2", "@sentry/nextjs": "7.105.0", - "@solana/web3.js": "^1.89.1", + "@solana/web3.js": "^1.89.2", "@tanstack/react-query": "^5.17.12", "@uniswap/sdk-core": "^4.0.9", "axios": "^1.7.4", diff --git a/yarn.lock b/yarn.lock index 43b3829c..1813d033 100644 --- a/yarn.lock +++ b/yarn.lock @@ -56,34 +56,13 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.6", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.5": - version "7.23.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.8.tgz#8ee6fe1ac47add7122902f257b8ddf55c898f650" - integrity sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw== - dependencies: - regenerator-runtime "^0.14.0" - -"@babel/runtime@^7.17.2", "@babel/runtime@^7.23.4": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7" - integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw== - dependencies: - regenerator-runtime "^0.14.0" - -"@babel/runtime@^7.17.9": +"@babel/runtime@^7.12.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.9", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.6", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.5", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.4": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2" integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ== dependencies: regenerator-runtime "^0.14.0" -"@babel/runtime@^7.23.2": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885" - integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== - dependencies: - regenerator-runtime "^0.14.0" - "@babel/types@^7.22.15": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.6.tgz#be33fdb151e1f5a56877d704492c240fc71c7ccd" @@ -1196,12 +1175,12 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== -"@noble/hashes@1.3.2", "@noble/hashes@^1.3.1", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.2": +"@noble/hashes@1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== -"@noble/hashes@1.3.3", "@noble/hashes@^1.3.2", "@noble/hashes@~1.3.1": +"@noble/hashes@1.3.3", "@noble/hashes@^1.3.1", "@noble/hashes@^1.3.2", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.1", "@noble/hashes@~1.3.2": version "1.3.3" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== @@ -1589,10 +1568,10 @@ dependencies: buffer "~6.0.3" -"@solana/web3.js@^1.89.1": - version "1.89.1" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.89.1.tgz#52df6820f2d088c4558aa359af40580a03d10ec9" - integrity sha512-t9TTLtPQxtQB3SAf/5E8xPXfVDsC6WGOsgKY02l2cbe0HLymT7ynE8Hu48Lk5qynHCquj6nhISfEHcjMkYpu/A== +"@solana/web3.js@^1.89.2": + version "1.89.2" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.89.2.tgz#d3d732f54eba86d5a13202d95385820ae9d90343" + integrity sha512-jmrF8et3Umic4kaJeX5ROrC0PBEQ572zrG2FHARcPy9inHQXInLIOovokQo7FjPfYDgPcFpCW+f7GPhsKkYqMg== dependencies: "@babel/runtime" "^7.23.4" "@noble/curves" "^1.2.0" From 551c719c64c4bfa32cdb5603098d42a983c51bc2 Mon Sep 17 00:00:00 2001 From: Ali Maktabi <67747298+alimaktabi@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:49:45 +0330 Subject: [PATCH 06/12] Update .env --- .env | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 7dc25f34..46b32eb3 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ -NEXT_PUBLIC_API_URL=https://api.unitap.app +NEXT_PUBLIC_API_URL=https://stage.unitap.app NEXT_PUBLIC_GOOGLE_ANALYTICS='G-HHTJ4P5ZB0' # API_URL=https://api.unitap.app @@ -7,10 +7,10 @@ NEXT_PUBLIC_GOOGLE_ANALYTICS='G-HHTJ4P5ZB0' NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID="31516b299852311acdc936c61cd7892c" -NEXT_PUBLIC_IS_STAGE=0 +NEXT_PUBLIC_IS_STAGE=1 SOLANA_HTTP_PROVIDER="https://fragrant-intensive-patina.solana-mainnet.quiknode.pro/08a6330aa4eb2bbad964ee86b9a271fdb5e8a7ad/" NEXT_PUBLIC_CLOUDFLARE_TURNSITE_SITEKEY="0x4AAAAAAAiB14Mx3cWX5zwu" -H_CAPTCHA_SITEKEY="68c27f52-99c6-4832-b2b0-b5ac343a9f90" \ No newline at end of file +H_CAPTCHA_SITEKEY="68c27f52-99c6-4832-b2b0-b5ac343a9f90" From 5d84e2f512bd751da69dd01459d065e7e2345c7f Mon Sep 17 00:00:00 2001 From: Ali Maktabi Date: Sat, 7 Sep 2024 12:06:09 +0330 Subject: [PATCH 07/12] added hcaptcha sitekey --- .env | 2 +- .../components/Modals/enroll-body/RaffleRequirementModal.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 46b32eb3..bfd76425 100644 --- a/.env +++ b/.env @@ -13,4 +13,4 @@ NEXT_PUBLIC_IS_STAGE=1 SOLANA_HTTP_PROVIDER="https://fragrant-intensive-patina.solana-mainnet.quiknode.pro/08a6330aa4eb2bbad964ee86b9a271fdb5e8a7ad/" NEXT_PUBLIC_CLOUDFLARE_TURNSITE_SITEKEY="0x4AAAAAAAiB14Mx3cWX5zwu" -H_CAPTCHA_SITEKEY="68c27f52-99c6-4832-b2b0-b5ac343a9f90" +NEXT_PUBLIC_H_CAPTCHA_SITEKEY="68c27f52-99c6-4832-b2b0-b5ac343a9f90" diff --git a/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx b/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx index 0bfecdb6..6719d27f 100644 --- a/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx +++ b/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx @@ -466,7 +466,7 @@ const PrizeRequirementBody: FC<{ )} {constraint.name === "core.HasVerifiedHCaptcha" && ( localStorage.setItem("captcha-token", token) } From abecf34854b1f8f70a35e07149b7c6df9c64259b Mon Sep 17 00:00:00 2001 From: Ali Maktabi Date: Sat, 7 Sep 2024 12:06:40 +0330 Subject: [PATCH 08/12] fixed stylings --- .../enroll-body/RaffleRequirementModal.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx b/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx index 6719d27f..a284ef98 100644 --- a/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx +++ b/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx @@ -464,14 +464,17 @@ const PrizeRequirementBody: FC<{ > )} - {constraint.name === "core.HasVerifiedHCaptcha" && ( - - localStorage.setItem("captcha-token", token) - } - /> - )} +
+ {constraint.name === "core.HasVerifiedHCaptcha" && ( + + localStorage.setItem("captcha-token", token) + } + /> + )} +
{checkConnections(connections, constraint.name) ? ( From d1fb3b3818cb5b4f2bb2d4e8f69968d9134e0987 Mon Sep 17 00:00:00 2001 From: Ali Maktabi Date: Sat, 7 Sep 2024 12:51:21 +0330 Subject: [PATCH 09/12] modified hcaptcha header --- .../Modals/enroll-body/RaffleRequirementModal.tsx | 2 +- utils/api/prizetap.ts | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx b/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx index a284ef98..3e585cee 100644 --- a/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx +++ b/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx @@ -470,7 +470,7 @@ const PrizeRequirementBody: FC<{ theme="dark" sitekey={process.env.NEXT_PUBLIC_H_CAPTCHA_SITEKEY!} onVerify={(token, ekey) => - localStorage.setItem("captcha-token", token) + localStorage.setItem("h-captcha-token", token) } /> )} diff --git a/utils/api/prizetap.ts b/utils/api/prizetap.ts index c96687b5..ca35dde9 100644 --- a/utils/api/prizetap.ts +++ b/utils/api/prizetap.ts @@ -64,21 +64,23 @@ export async function getEnrollmentApi( address: string, userTicketChance: number, ) { - const captchaToken = localStorage.getItem("captcha-token"); + const cloudFlareaptchaToken = localStorage.getItem("captcha-token"); + const hCaptchaToken = localStorage.getItem("h-captcha-token"); const response = await axiosInstance.post( `/api/prizetap/raffle-enrollment/${raffleID}/`, { userWalletAddress: address, prizetap_winning_chance_number: userTicketChance.toString(), - "cf-turnstile-response": captchaToken, + "cf-turnstile-response": cloudFlareaptchaToken, + "hc-turnstile-response": hCaptchaToken, }, { headers: { Authorization: `Token ${token}`, }, params: { - "cf-turnstile-response": captchaToken, + "cf-turnstile-response": cloudFlareaptchaToken, }, }, ); @@ -101,13 +103,15 @@ export async function getRaffleConstraintsVerifications( rafflePk: number, token: string, ) { - const captchaToken = localStorage.getItem("captcha-token"); + const cloudflareCaptchaToken = localStorage.getItem("captcha-token"); + const hCaptchaToken = localStorage.getItem("h-captcha-token"); const response = await axiosInstance.get( "/api/prizetap/get-raffle-constraints/" + rafflePk + "/", { params: { - "cf-turnstile-response": captchaToken, + "cf-turnstile-response": cloudflareCaptchaToken, + "hc-turnstile-response": hCaptchaToken, }, headers: { Authorization: `Token ${token}`, From fee259f3a72e9454cf994565702c1f7c93081660 Mon Sep 17 00:00:00 2001 From: Ali Maktabi Date: Sat, 7 Sep 2024 13:02:54 +0330 Subject: [PATCH 10/12] removed backend_key_service --- utils/api/index.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/utils/api/index.ts b/utils/api/index.ts index e2a99ba4..6420c09d 100644 --- a/utils/api/index.ts +++ b/utils/api/index.ts @@ -9,19 +9,20 @@ export * from "./social-accounts"; export const serverFetch = async (url: string, init?: RequestInit) => { if (init?.headers) { // @ts-ignore - init.headers.backend_service_key = process.env.BACKEND_SERVICE_KEY; + // init.headers.backend_service_key = process.env.BACKEND_SERVICE_KEY; // @ts-ignore // init.headers.Cookie = `backend_service_key=${process.env.BACKEND_SERVICE_KEY};`; } const res = await fetch(process.env.NEXT_PUBLIC_API_URL! + url, { cache: "no-store", - ...(init ?? { - headers: { - backend_service_key: process.env.BACKEND_SERVICE_KEY!, - Cookie: `backend_service_key=${process.env.BACKEND_SERVICE_KEY};`, - }, - }), + ...(init ?? + { + // headers: { + // // backend_service_key: process.env.BACKEND_SERVICE_KEY!, + // // Cookie: `backend_service_key=${process.env.BACKEND_SERVICE_KEY};`, + // }, + }), }); // console.log(await res.clone().text()); From 22a68f31d3d99756e3435f3c1aa3b8c636c61cd6 Mon Sep 17 00:00:00 2001 From: Ali Maktabi Date: Sat, 7 Sep 2024 13:06:01 +0330 Subject: [PATCH 11/12] modified sending captcha tokens method --- utils/api/prizetap.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/utils/api/prizetap.ts b/utils/api/prizetap.ts index ca35dde9..0e1874eb 100644 --- a/utils/api/prizetap.ts +++ b/utils/api/prizetap.ts @@ -72,16 +72,16 @@ export async function getEnrollmentApi( { userWalletAddress: address, prizetap_winning_chance_number: userTicketChance.toString(), - "cf-turnstile-response": cloudFlareaptchaToken, - "hc-turnstile-response": hCaptchaToken, }, { headers: { - Authorization: `Token ${token}`, - }, - params: { "cf-turnstile-response": cloudFlareaptchaToken, + "hc-turnstile-response": hCaptchaToken, + Authorization: `Token ${token}`, }, + // params: { + // "cf-turnstile-response": cloudFlareaptchaToken, + // }, }, ); return response.data; @@ -109,12 +109,10 @@ export async function getRaffleConstraintsVerifications( const response = await axiosInstance.get( "/api/prizetap/get-raffle-constraints/" + rafflePk + "/", { - params: { - "cf-turnstile-response": cloudflareCaptchaToken, - "hc-turnstile-response": hCaptchaToken, - }, headers: { Authorization: `Token ${token}`, + "cf-turnstile-response": cloudflareCaptchaToken, + "hc-turnstile-response": hCaptchaToken, }, }, ); From 933d3b124ecc60ce822a297af278594d1932216a Mon Sep 17 00:00:00 2001 From: Ali Maktabi Date: Fri, 13 Sep 2024 11:46:53 +0330 Subject: [PATCH 12/12] fixed images fields --- app/prizetap/components/Linea/index.tsx | 2 +- .../enroll-body/BrightNotConnectedBody.tsx | 6 +-- .../Modals/enroll-body/InitialBody.tsx | 2 +- .../enroll-body/RaffleRequirementModal.tsx | 2 +- .../Modals/enroll-body/WrongNetworkBody.tsx | 2 +- app/prizetap/components/RafflesList.tsx | 2 +- app/prizetap/components/permissions.tsx | 2 +- .../containers/landing/prizeTap/index.tsx | 2 +- .../containers/landing/tokenTap/index.tsx | 2 +- .../token-tap/Modals/ClaimFailedBody.tsx | 40 +++++++++---------- .../Modals/ClaimLightningContent.tsx | 4 +- .../token-tap/Modals/ClaimModal.tsx | 4 +- .../token-tap/Modals/InitialBody.tsx | 2 +- .../token-tap/Modals/MaxedOutBody.tsx | 4 +- .../Modals/NoRemainingClaimsBody.tsx | 26 ++++++------ .../token-tap/Modals/SuccessBody.tsx | 2 +- .../containers/token-tap/Permissions.tsx | 2 +- components/containers/token-tap/TokenCard.tsx | 4 +- types/prizetap.ts | 2 +- types/tokentap.ts | 2 +- 20 files changed, 57 insertions(+), 57 deletions(-) diff --git a/app/prizetap/components/Linea/index.tsx b/app/prizetap/components/Linea/index.tsx index ce2f19ca..09471776 100644 --- a/app/prizetap/components/Linea/index.tsx +++ b/app/prizetap/components/Linea/index.tsx @@ -31,7 +31,7 @@ export const LineaRaffleCard: FC<{ isHighlighted?: boolean; }> = ({ raffle, isHighlighted }) => { const { - imageUrl, + image: imageUrl, tokenUri, creatorUrl, twitterUrl, diff --git a/app/prizetap/components/Modals/enroll-body/BrightNotConnectedBody.tsx b/app/prizetap/components/Modals/enroll-body/BrightNotConnectedBody.tsx index 74d07b30..fdae80fe 100644 --- a/app/prizetap/components/Modals/enroll-body/BrightNotConnectedBody.tsx +++ b/app/prizetap/components/Modals/enroll-body/BrightNotConnectedBody.tsx @@ -24,15 +24,15 @@ const BrightNotConnectedBody: FC<{ <> -

+

{method === "Enroll" ? "You need to connect your BrightID to enroll in raffle" : " You need to connect your BrightID to claim your prize"} diff --git a/app/prizetap/components/Modals/enroll-body/InitialBody.tsx b/app/prizetap/components/Modals/enroll-body/InitialBody.tsx index fb53c379..e7bde9d7 100644 --- a/app/prizetap/components/Modals/enroll-body/InitialBody.tsx +++ b/app/prizetap/components/Modals/enroll-body/InitialBody.tsx @@ -134,7 +134,7 @@ const InitialBody: FC<{ className="chain-logo z-10 mb-10 mt-14" width="auto" height="110px" - iconSrc={raffle.imageUrl} + iconSrc={raffle.image} alt="" /> diff --git a/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx b/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx index 3e585cee..b86bffd3 100644 --- a/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx +++ b/app/prizetap/components/Modals/enroll-body/RaffleRequirementModal.tsx @@ -54,7 +54,7 @@ const Sidebar: FC<{