From 09e1e9e9e662767cd9383e05bf9db4e1691bd44e Mon Sep 17 00:00:00 2001 From: Ted Palmer Date: Tue, 5 Dec 2023 12:24:23 -0500 Subject: [PATCH 1/3] Upgrade rk to 1.21.0 and add new MintModal --- components/buttons/Mint.tsx | 23 +++++++---------------- package.json | 2 +- yarn.lock | 18 +++++++++--------- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/components/buttons/Mint.tsx b/components/buttons/Mint.tsx index 4b16492dd..b4917aa66 100644 --- a/components/buttons/Mint.tsx +++ b/components/buttons/Mint.tsx @@ -6,7 +6,7 @@ import React, { useContext, } from 'react' import { useConnectModal } from '@rainbow-me/rainbowkit' -import { CollectModal, CollectStep } from '@reservoir0x/reservoir-kit-ui' +import { MintStep, MintModal } from '@reservoir0x/reservoir-kit-ui' import { useMarketplaceChain } from 'hooks' import { CSS } from '@stitches/react' import { Button } from 'components/primitives' @@ -20,7 +20,7 @@ type Props = { buttonProps?: ComponentProps buttonChildren?: ReactNode mutate?: SWRResponse['mutate'] - openState?: ComponentPropsWithoutRef['openState'] + openState?: ComponentPropsWithoutRef['openState'] } const Mint: FC = ({ @@ -35,17 +35,18 @@ const Mint: FC = ({ const { openConnectModal } = useConnectModal() const marketplaceChain = useMarketplaceChain() const { feesOnTop } = useContext(ReferralContext) + const contract = collectionId?.split(':')?.[0] + const token = tokenId ? `${contract}:${tokenId}` : undefined return ( - {buttonChildren} } collectionId={collectionId} - tokenId={tokenId} - mode={'mint'} + token={token} openState={openState} feesOnTopUsd={feesOnTop} chainId={marketplaceChain.id} @@ -53,17 +54,7 @@ const Mint: FC = ({ openConnectModal?.() }} onClose={(data, currentStep) => { - if (mutate && currentStep == CollectStep.Complete) mutate() - }} - onPointerDownOutside={(e) => { - const privyLayer = document.getElementById('privy-dialog') - - const clickedInsidePrivyLayer = - privyLayer && e.target ? privyLayer.contains(e.target as Node) : false - - if (clickedInsidePrivyLayer) { - e.preventDefault() - } + if (mutate && currentStep == MintStep.Complete) mutate() }} /> ) diff --git a/package.json b/package.json index 4dad44b07..740525c41 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@radix-ui/react-toggle-group": "^1.0.1", "@radix-ui/react-tooltip": "1.0.6", "@rainbow-me/rainbowkit": "^1.1.3", - "@reservoir0x/reservoir-kit-ui": "1.20.0", + "@reservoir0x/reservoir-kit-ui": "1.21.0", "@sentry/nextjs": "^7.53.1", "@types/uuid": "^9.0.1", "dayjs": "^1.11.6", diff --git a/yarn.lock b/yarn.lock index f125cef25..abe284102 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1435,10 +1435,10 @@ dependencies: "@react-hookz/deep-equal" "^1.0.3" -"@reservoir0x/reservoir-kit-ui@1.20.0": - version "1.20.0" - resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-kit-ui/-/reservoir-kit-ui-1.20.0.tgz#4650597d9334ab7a3b9c53e83ef5ae20d29e9f63" - integrity sha512-ieV/f2b4eMOp2FYdIBLF2vqOUEGmN3dlQGflqq8MrtjKk3GBy6BPi6upvGivnO8bsVjzKH/36ueIcQNkXAG9sA== +"@reservoir0x/reservoir-kit-ui@1.21.0": + version "1.21.0" + resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-kit-ui/-/reservoir-kit-ui-1.21.0.tgz#e36aadf4414a53081fe04e5199eec2113b3377b3" + integrity sha512-0OViceR3s9vl/ZaCZevyuxlIpXh3DfRR9e4r35QHlzkqok7uyxEX3mc5D/iVXVBMnvGzzY+PNNHyJflgpofmEw== dependencies: "@fortawesome/fontawesome-svg-core" "^6.1.1" "@fortawesome/free-solid-svg-icons" "^6.1.1" @@ -1454,7 +1454,7 @@ "@radix-ui/react-toggle-group" "1.0.4" "@radix-ui/react-tooltip" "1.0.6" "@react-hookz/web" "^19.2.0" - "@reservoir0x/reservoir-sdk" "1.9.2" + "@reservoir0x/reservoir-sdk" "1.10.0" "@stitches/react" "1.3.1-1" dayjs "^1.11.4" flatpickr "^4.6.13" @@ -1462,10 +1462,10 @@ react-flatpickr "^3.10.13" swr "2.0.1" -"@reservoir0x/reservoir-sdk@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-sdk/-/reservoir-sdk-1.9.2.tgz#02f19d9fa19ca8f6bd60bc4fbaf3d699cbb06bf0" - integrity sha512-5OHQmkJX9mxR2idQypnLgfV44FojyVZ3REQ9Yue46oT24xr51Q4HdlnmqTuaBaVLeCycXK2Vn7CnNOOASf+Nyg== +"@reservoir0x/reservoir-sdk@1.10.0": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-sdk/-/reservoir-sdk-1.10.0.tgz#972c1f427d0ab0e070f1e5c6484a2ed9f257ef4c" + integrity sha512-VeSx6nDUfCnyEpQL0sOo+U4qAa2pvFUk0vBQdPc2P57RGBs4Ze+xIqP3oj0OcaRavaMeoFrIHK522/nEoSLsBw== dependencies: axios "^0.27.2" From 274d5c3645d97c5291e9ba6d4fa0c2c935967e7f Mon Sep 17 00:00:00 2001 From: Ted Palmer Date: Wed, 6 Dec 2023 10:08:42 -0500 Subject: [PATCH 2/3] Fix typo --- components/navbar/index.tsx | 18 +++--------------- components/rankings/MintRankingsTable.tsx | 2 +- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/components/navbar/index.tsx b/components/navbar/index.tsx index 8b061dcf6..5fd0b9a53 100644 --- a/components/navbar/index.tsx +++ b/components/navbar/index.tsx @@ -135,28 +135,16 @@ const Navbar = () => { - Trending + Trending - - Collections - + Collections - - Mints - + Mints diff --git a/components/rankings/MintRankingsTable.tsx b/components/rankings/MintRankingsTable.tsx index 2545c18a3..17eafa31d 100644 --- a/components/rankings/MintRankingsTable.tsx +++ b/components/rankings/MintRankingsTable.tsx @@ -302,7 +302,7 @@ const headings = [ 'Mint Price', 'Floor Price', 'Total Mints', - '1H Mints', + '1h Mints', '6h Mints', 'Recent Mints', ] From 76780b0cfa70a3f0844339b55c560cb8bcdd5d17 Mon Sep 17 00:00:00 2001 From: armando Date: Wed, 6 Dec 2023 12:16:39 -0800 Subject: [PATCH 3/3] feat: upgarde posthog-js --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 740525c41..4333fb1d3 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "lodash": "^4.17.21", "next": "13.0", "openapi-typescript-fetch": "^1.1.3", - "posthog-js": "^1.68.4", + "posthog-js": "^1.93.6", "react": "^18.0", "react-dom": "^18.0", "react-hotkeys-hook": "^4.0.4", diff --git a/yarn.lock b/yarn.lock index abe284102..7f53ef9c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4310,10 +4310,10 @@ postcss@8.4.14: picocolors "^1.0.0" source-map-js "^1.0.2" -posthog-js@^1.68.4: - version "1.68.4" - resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.68.4.tgz#c9ec6edc8f6f274970d4f05c4ffa3a2564581b1a" - integrity sha512-rHk4uk99nvWiDTU7P2mFdEfzFR6km0hvOpCR3tm/+F7kCJKs7QDkMblOZZHZultxM4wSNyB4neeohmnHjKYUhQ== +posthog-js@^1.93.6: + version "1.93.6" + resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.93.6.tgz#e9524e55305b5df40c1fedb971d33f420ac80e33" + integrity sha512-Jou2awqQH5PDtDe9hZxpe9PO4D0uUOU7eA1lGni4pBxJckeA94P7WF3ieQj355xY96ZcXVQmGJykypO/FyBvpQ== dependencies: fflate "^0.4.1"