From bed72b64351276b3f4d6d250e864ca635a571720 Mon Sep 17 00:00:00 2001 From: samuelea Date: Wed, 27 Mar 2024 11:52:32 -0400 Subject: [PATCH 1/4] metamask improvement --- .../KitProvider/ConnectWalletContent/index.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/kit/src/components/KitProvider/ConnectWalletContent/index.tsx b/packages/kit/src/components/KitProvider/ConnectWalletContent/index.tsx index c4aeb8f3..b8d9f3e3 100644 --- a/packages/kit/src/components/KitProvider/ConnectWalletContent/index.tsx +++ b/packages/kit/src/components/KitProvider/ConnectWalletContent/index.tsx @@ -83,6 +83,15 @@ export const ConnectWalletContent = (props: ConnectWalletContentProps) => { const email = prompt('Auto-email login, please specify the email address:') localStorage.setItem(EMAIL_CONNECTOR_LOCAL_STORAGE_KEY, email || '') } + + if (connector._wallet.id === 'metamask' && typeof window !== 'undefined') { + const isMetamaskFound = !!window?.ethereum?._metamask + if (!isMetamaskFound) { + window.open('https://metamask.io/download/') + return + } + } + connect({ connector }) } From 0e3906ed9492adf53b29fea4f1184c2b8824ab66 Mon Sep 17 00:00:00 2001 From: samuelea Date: Wed, 27 Mar 2024 11:55:13 -0400 Subject: [PATCH 2/4] databeats identify package --- packages/wallet/src/views/SendCoin.tsx | 6 ++++-- packages/wallet/src/views/SendCollectible.tsx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/wallet/src/views/SendCoin.tsx b/packages/wallet/src/views/SendCoin.tsx index 42994c99..5f662f1c 100644 --- a/packages/wallet/src/views/SendCoin.tsx +++ b/packages/wallet/src/views/SendCoin.tsx @@ -155,7 +155,8 @@ export const SendCoin = ({ analytics?.track({ event: 'SEND_TRANSACTION_REQUEST', props: { - 'walletClient': (connector as ExtendedConnector | undefined)?._wallet?.id || 'unknown' + 'walletClient': (connector as ExtendedConnector | undefined)?._wallet?.id || 'unknown', + source: 'sequence-kit/wallet' } }) walletClient?.sendTransaction({ @@ -166,7 +167,8 @@ export const SendCoin = ({ analytics?.track({ event: 'SEND_TRANSACTION_REQUEST', props: { - 'walletClient': (connector as ExtendedConnector | undefined)?._wallet?.id || 'unknown' + 'walletClient': (connector as ExtendedConnector | undefined)?._wallet?.id || 'unknown', + source: 'sequence-kit/wallet' } }) walletClient?.sendTransaction({ diff --git a/packages/wallet/src/views/SendCollectible.tsx b/packages/wallet/src/views/SendCollectible.tsx index 042a6214..3765a485 100644 --- a/packages/wallet/src/views/SendCollectible.tsx +++ b/packages/wallet/src/views/SendCollectible.tsx @@ -142,7 +142,8 @@ export const SendCollectible = ({ analytics?.track({ event: 'SEND_TRANSACTION_REQUEST', props: { - 'walletClient': (connector as ExtendedConnector | undefined)?._wallet?.id || 'unknown' + 'walletClient': (connector as ExtendedConnector | undefined)?._wallet?.id || 'unknown', + source: 'sequence-kit/wallet' } }) // _from, _to, _id @@ -160,7 +161,8 @@ export const SendCollectible = ({ analytics?.track({ event: 'SEND_TRANSACTION_REQUEST', props: { - 'walletClient': (connector as ExtendedConnector | undefined)?._wallet?.id || 'unknown' + 'walletClient': (connector as ExtendedConnector | undefined)?._wallet?.id || 'unknown', + source: 'sequence-kit/wallet' } }) // _from, _to, _ids, _amounts, _data From f4e71c6bdd1ed824a1d9031c80e194e88d0d4127 Mon Sep 17 00:00:00 2001 From: samuelea Date: Wed, 27 Mar 2024 14:31:21 -0400 Subject: [PATCH 3/4] update version --- packages/checkout/package.json | 2 +- packages/connectors/package.json | 2 +- packages/kit/package.json | 2 +- packages/wallet/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/checkout/package.json b/packages/checkout/package.json index 0bb8715a..ffcef2e4 100644 --- a/packages/checkout/package.json +++ b/packages/checkout/package.json @@ -1,6 +1,6 @@ { "name": "@0xsequence/kit-checkout", - "version": "2.0.7", + "version": "2.0.8", "description": "Checkout UI for Sequence Kit", "repository": "https://github.com/0xsequence/kit/tree/master/packages/checkout", "main": "dist/0xsequence-kit-checkout.cjs.js", diff --git a/packages/connectors/package.json b/packages/connectors/package.json index aa332598..da5a3021 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,6 +1,6 @@ { "name": "@0xsequence/kit-connectors", - "version": "2.0.7", + "version": "2.0.8", "description": "Wallets for Sequence Kit", "repository": "https://github.com/0xsequence/kit/tree/master/packages/connectors", "main": "dist/0xsequence-kit-connectors.cjs.js", diff --git a/packages/kit/package.json b/packages/kit/package.json index 54f80cf1..da9cac70 100644 --- a/packages/kit/package.json +++ b/packages/kit/package.json @@ -1,6 +1,6 @@ { "name": "@0xsequence/kit", - "version": "2.0.7", + "version": "2.0.8", "description": "Core package for Sequence Kit", "keywords": [ "sequence", diff --git a/packages/wallet/package.json b/packages/wallet/package.json index 61bda6a8..4ad96279 100644 --- a/packages/wallet/package.json +++ b/packages/wallet/package.json @@ -1,6 +1,6 @@ { "name": "@0xsequence/kit-wallet", - "version": "2.0.7", + "version": "2.0.8", "description": "Wallet UI for Sequence Kit", "repository": "https://github.com/0xsequence/kit/tree/master/packages/wallet", "main": "dist/0xsequence-kit-wallet.cjs.js", From 531069d88230bcb02496eb44aa7595a57ea9f941 Mon Sep 17 00:00:00 2001 From: samuelea Date: Wed, 27 Mar 2024 14:32:12 -0400 Subject: [PATCH 4/4] pnpm lock file --- pnpm-lock.yaml | 158 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 150 insertions(+), 8 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b240278c..cfcc035d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -144,17 +144,17 @@ importers: specifier: ^1.1.0 version: 1.2.3(@types/react-dom@18.2.19)(@types/react@18.2.55)(framer-motion@8.5.5)(react-dom@18.2.0)(react@18.2.0) '@0xsequence/kit': - specifier: workspace:* - version: link:../../packages/kit + specifier: ^2.0.0 + version: 2.0.7(0xsequence@1.9.11)(@types/react-dom@18.2.19)(@types/react@18.2.55)(ethers@5.7.2)(react-dom@18.2.0)(react@18.2.0)(viem@2.7.9)(wagmi@2.5.7) '@0xsequence/kit-checkout': - specifier: workspace:* - version: link:../../packages/checkout + specifier: ^2.0.0 + version: 2.0.7(@0xsequence/design-system@1.2.3)(@0xsequence/kit@2.0.7)(@babel/core@7.23.9)(@vanilla-extract/css@1.14.1)(@vanilla-extract/recipes@0.3.0)(ethers@5.7.2)(framer-motion@8.5.5)(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0)(wagmi@2.5.7) '@0xsequence/kit-connectors': - specifier: workspace:* - version: link:../../packages/connectors + specifier: ^2.0.0 + version: 2.0.7(0xsequence@1.9.11)(@0xsequence/design-system@1.2.3)(@0xsequence/kit@2.0.7)(ethers@5.7.2)(react-dom@18.2.0)(react@18.2.0)(viem@2.7.9)(wagmi@2.5.7) '@0xsequence/kit-wallet': - specifier: workspace:* - version: link:../../packages/wallet + specifier: ^2.0.0 + version: 2.0.7(@0xsequence/design-system@1.2.3)(@0xsequence/kit@2.0.7)(@types/react-dom@18.2.19)(@types/react@18.2.55)(@vanilla-extract/css@1.14.1)(@vanilla-extract/recipes@0.3.0)(ethers@5.7.2)(framer-motion@8.5.5)(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0)(wagmi@2.5.7) '@tanstack/react-query': specifier: ^4.36.1 version: 4.36.1(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0) @@ -578,6 +578,148 @@ packages: /@0xsequence/indexer@1.9.11: resolution: {integrity: sha512-YsaY+oRuE1WS0CG203HBbC8iz9F2I8LvxbGW0Q9YxhJuQGYD9UJ1IncGh9qYG7b60Sz8qvZGSFsG7X5PYyEsRg==} + /@0xsequence/kit-checkout@2.0.7(@0xsequence/design-system@1.2.3)(@0xsequence/kit@2.0.7)(@babel/core@7.23.9)(@vanilla-extract/css@1.14.1)(@vanilla-extract/recipes@0.3.0)(ethers@5.7.2)(framer-motion@8.5.5)(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0)(wagmi@2.5.7): + resolution: {integrity: sha512-oolLugx2I2oG4Hk4aopJZmMch1/gCny9KmVNds02374ZM1bM4uc1yp+3XNLuRkZcuuTmbjO/5S14tTjyOH0YdA==} + peerDependencies: + '@0xsequence/design-system': '>=1.1.0' + '@0xsequence/kit': 2.0.7 + '@vanilla-extract/css': '>=1.9.3' + '@vanilla-extract/recipes': '>=0.3.0' + ethers: '>=5.7.2' + framer-motion: '>=8.5.2' + react: '>=17' + react-dom: '>=17' + wagmi: '>=2.0.0' + dependencies: + 0xsequence: 1.9.11(ethers@5.7.2) + '@0xsequence/api': 1.9.11 + '@0xsequence/design-system': 1.2.3(@types/react-dom@18.2.19)(@types/react@18.2.55)(framer-motion@8.5.5)(react-dom@18.2.0)(react@18.2.0) + '@0xsequence/indexer': 1.9.11 + '@0xsequence/kit': 2.0.7(0xsequence@1.9.11)(@types/react-dom@18.2.19)(@types/react@18.2.55)(ethers@5.7.2)(react-dom@18.2.0)(react@18.2.0)(viem@2.7.9)(wagmi@2.5.7) + '@0xsequence/metadata': 1.9.11 + '@0xsequence/network': 1.9.11(ethers@5.7.2) + '@paperxyz/react-client-sdk': 1.1.5(@babel/core@7.23.9)(react-dom@18.2.0)(react@18.2.0) + '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0) + '@vanilla-extract/css': 1.14.1 + '@vanilla-extract/recipes': 0.3.0(@vanilla-extract/css@1.14.1) + ethers: 5.7.2 + framer-motion: 8.5.5(react-dom@18.2.0)(react@18.2.0) + react: 18.2.0 + react-copy-to-clipboard: 5.1.0(react@18.2.0) + react-dom: 18.2.0(react@18.2.0) + wagmi: 2.5.7(@tanstack/react-query@4.36.1)(@types/react@18.2.55)(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0)(rollup@2.79.1)(typescript@5.3.3)(viem@2.7.9) + transitivePeerDependencies: + - '@babel/core' + - bufferutil + - react-native + - utf-8-validate + dev: false + + /@0xsequence/kit-connectors@2.0.7(0xsequence@1.9.11)(@0xsequence/design-system@1.2.3)(@0xsequence/kit@2.0.7)(ethers@5.7.2)(react-dom@18.2.0)(react@18.2.0)(viem@2.7.9)(wagmi@2.5.7): + resolution: {integrity: sha512-tjSx0RTI5k9wDTK3S3xQ969wG8IaPOmPpNHR620HBkpnHysVVj4nyNW/5tutbe0zF0QvzIcVVex2KJI1+9kw9g==} + peerDependencies: + 0xsequence: '>=1.9.11' + '@0xsequence/design-system': '>=1.1.0' + '@0xsequence/kit': 2.0.7 + ethers: '>=5.7.2' + react: '>=17' + react-dom: '>=17' + viem: '>=2.0.0' + wagmi: '>=2.0.0' + dependencies: + 0xsequence: 1.9.11(ethers@5.7.2) + '@0xsequence/design-system': 1.2.3(@types/react-dom@18.2.19)(@types/react@18.2.55)(framer-motion@8.5.5)(react-dom@18.2.0)(react@18.2.0) + '@0xsequence/kit': 2.0.7(0xsequence@1.9.11)(@types/react-dom@18.2.19)(@types/react@18.2.55)(ethers@5.7.2)(react-dom@18.2.0)(react@18.2.0)(viem@2.7.9)(wagmi@2.5.7) + '@0xsequence/provider': 1.9.11(ethers@5.7.2) + ethers: 5.7.2 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + viem: 2.7.9(typescript@5.3.3) + wagmi: 2.5.7(@tanstack/react-query@4.36.1)(@types/react@18.2.55)(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0)(rollup@2.79.1)(typescript@5.3.3)(viem@2.7.9) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: false + + /@0xsequence/kit-wallet@2.0.7(@0xsequence/design-system@1.2.3)(@0xsequence/kit@2.0.7)(@types/react-dom@18.2.19)(@types/react@18.2.55)(@vanilla-extract/css@1.14.1)(@vanilla-extract/recipes@0.3.0)(ethers@5.7.2)(framer-motion@8.5.5)(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0)(wagmi@2.5.7): + resolution: {integrity: sha512-Eo/L2zoDv9x0DWStoKLLrMCmshrSPkHs06bSXLIk1/9nniIJ3z5J2xlNyFKZuITwnJymb7SL/EoVn/bt9a7+Zw==} + peerDependencies: + '@0xsequence/design-system': '>=1.1.0' + '@0xsequence/kit': 2.0.7 + '@vanilla-extract/css': '>=1.9.3' + '@vanilla-extract/recipes': '>=0.3.0' + ethers: '>=5.7.2' + framer-motion: '>=8.5.2' + react: '>=17' + react-dom: '>=17' + wagmi: '>=2.5.0' + dependencies: + 0xsequence: 1.9.11(ethers@5.7.2) + '@0xsequence/api': 1.9.11 + '@0xsequence/design-system': 1.2.3(@types/react-dom@18.2.19)(@types/react@18.2.55)(framer-motion@8.5.5)(react-dom@18.2.0)(react@18.2.0) + '@0xsequence/indexer': 1.9.11 + '@0xsequence/kit': 2.0.7(0xsequence@1.9.11)(@types/react-dom@18.2.19)(@types/react@18.2.55)(ethers@5.7.2)(react-dom@18.2.0)(react@18.2.0)(viem@2.7.9)(wagmi@2.5.7) + '@0xsequence/metadata': 1.9.11 + '@0xsequence/network': 1.9.11(ethers@5.7.2) + '@radix-ui/react-popover': 1.0.7(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) + '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0) + '@vanilla-extract/css': 1.14.1 + '@vanilla-extract/recipes': 0.3.0(@vanilla-extract/css@1.14.1) + clsx: 2.1.0 + dayjs: 1.11.10 + ethers: 5.7.2 + framer-motion: 8.5.5(react-dom@18.2.0)(react@18.2.0) + fuse.js: 6.6.2 + lodash: 4.17.21 + qrcode.react: 3.1.0(react@18.2.0) + react: 18.2.0 + react-copy-to-clipboard: 5.1.0(react@18.2.0) + react-dom: 18.2.0(react@18.2.0) + wagmi: 2.5.7(@tanstack/react-query@4.36.1)(@types/react@18.2.55)(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0)(rollup@2.79.1)(typescript@5.3.3)(viem@2.7.9) + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + - bufferutil + - react-native + - utf-8-validate + dev: false + + /@0xsequence/kit@2.0.7(0xsequence@1.9.11)(@types/react-dom@18.2.19)(@types/react@18.2.55)(ethers@5.7.2)(react-dom@18.2.0)(react@18.2.0)(viem@2.7.9)(wagmi@2.5.7): + resolution: {integrity: sha512-AABTYmqCA1TxxtIaRwUDf6t1iK2eJ+iesomoHjokYFQwfKikRNA7aT7CkxJnYmAShRBIxKJAVnbHhOEhXQS7ow==} + peerDependencies: + 0xsequence: '>=1.9.11' + ethers: '>=5.7.2' + react: '>=17' + react-dom: '>=17' + viem: '>=2.0.0' + wagmi: '>=2.0.0' + dependencies: + 0xsequence: 1.9.11(ethers@5.7.2) + '@0xsequence/api': 1.9.11 + '@0xsequence/auth': 1.9.11(ethers@5.7.2) + '@0xsequence/design-system': 1.2.3(@types/react-dom@18.2.19)(@types/react@18.2.55)(framer-motion@8.5.5)(react-dom@18.2.0)(react@18.2.0) + '@0xsequence/ethauth': 0.8.1(ethers@5.7.2) + '@0xsequence/indexer': 1.9.11 + '@0xsequence/kit-connectors': 2.0.7(0xsequence@1.9.11)(@0xsequence/design-system@1.2.3)(@0xsequence/kit@2.0.7)(ethers@5.7.2)(react-dom@18.2.0)(react@18.2.0)(viem@2.7.9)(wagmi@2.5.7) + '@0xsequence/metadata': 1.9.11 + '@0xsequence/network': 1.9.11(ethers@5.7.2) + '@0xsequence/provider': 1.9.11(ethers@5.7.2) + '@0xsequence/utils': 1.9.11(ethers@5.7.2) + '@vanilla-extract/css': 1.14.1 + '@vanilla-extract/recipes': 0.3.0(@vanilla-extract/css@1.14.1) + ethers: 5.7.2 + framer-motion: 8.5.5(react-dom@18.2.0)(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + viem: 2.7.9(typescript@5.3.3) + wagmi: 2.5.7(@tanstack/react-query@4.36.1)(@types/react@18.2.55)(react-dom@18.2.0)(react-native@0.73.4)(react@18.2.0)(rollup@2.79.1)(typescript@5.3.3)(viem@2.7.9) + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + - bufferutil + - utf-8-validate + dev: false + /@0xsequence/metadata@1.9.11: resolution: {integrity: sha512-eTYaHLi2fwn+92TH6w3wJbEne0+DrmYMp2f7GMil66Zzsqus1O4y8zrrvjMyhTbRavG5cOrIkNDBBZponBoP5Q==}