From d8b537be254ad84142a9ad7606f8d4ba6c3dcf61 Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:24:34 +0200 Subject: [PATCH 01/65] refactor: make chain selector component config agnostic (#795) --- packages/common/src/types/configs.ts | 5 +++ packages/core-sdk/src/index.ts | 1 + .../wallet2/selector/ChainSelector.tsx | 38 ++++++++++++------- .../src/stories/ConnectWallet.stories.tsx | 4 +- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/packages/common/src/types/configs.ts b/packages/common/src/types/configs.ts index 445bba4a1..8a0c8878f 100644 --- a/packages/common/src/types/configs.ts +++ b/packages/common/src/types/configs.ts @@ -75,3 +75,8 @@ export type ProtocolConfig = { metaTx?: Partial; lens: Lens | undefined; }; + +export type CoreProtocolConfig = Pick< + ProtocolConfig, + "envName" | "chainId" | "configId" +>; diff --git a/packages/core-sdk/src/index.ts b/packages/core-sdk/src/index.ts index 53795b072..88a8a1339 100644 --- a/packages/core-sdk/src/index.ts +++ b/packages/core-sdk/src/index.ts @@ -24,6 +24,7 @@ export { ConfigId, MetaTxConfig, ProtocolConfig, + CoreProtocolConfig, abis } from "@bosonprotocol/common"; diff --git a/packages/react-kit/src/components/wallet2/selector/ChainSelector.tsx b/packages/react-kit/src/components/wallet2/selector/ChainSelector.tsx index 2e0786789..43e5b6245 100644 --- a/packages/react-kit/src/components/wallet2/selector/ChainSelector.tsx +++ b/packages/react-kit/src/components/wallet2/selector/ChainSelector.tsx @@ -28,10 +28,13 @@ import { UniWalletSupportedChains, getChainPriority } from "../../../lib/const/chains"; -import { useConfigContext } from "../../config/ConfigContext"; -import { getEnvConfigsFilteredByEnv } from "../../../lib/config/getConfigsByChainId"; +import { getEnvConfigsFilteredByEnv as importedGetEnvConfigsFilteredByEnv } from "../../../lib/config/getConfigsByChainId"; import { useSelectChain } from "../../../hooks/connection/useSelectChain"; -import { ConfigId, ProtocolConfig } from "@bosonprotocol/core-sdk"; +import { + ConfigId, + EnvironmentType, + CoreProtocolConfig +} from "@bosonprotocol/core-sdk"; import { SvgImage } from "../../ui/SvgImage"; const IconAndChevron = styled.div<{ @@ -57,11 +60,6 @@ const IconAndChevron = styled.div<{ } `; -export interface ChainSelectorProps { - leftAlign?: boolean; - backgroundColor: CSSProperties["backgroundColor"]; -} - function useWalletSupportedChains({ NETWORK_SELECTOR_CHAINS_IDS }: { @@ -88,14 +86,25 @@ const chevronProps = { height: 20, width: 20 }; + +export interface ChainSelectorProps { + leftAlign?: boolean; + backgroundColor: CSSProperties["backgroundColor"]; + config: CoreProtocolConfig; + getEnvConfigsFilteredByEnv?: ( + envName: EnvironmentType + ) => CoreProtocolConfig[]; +} + export const ChainSelector = ({ leftAlign, - backgroundColor + backgroundColor, + config, + getEnvConfigsFilteredByEnv = importedGetEnvConfigsFilteredByEnv }: ChainSelectorProps) => { - const { config } = useConfigContext(); const NETWORK_SELECTOR_CHAINS = useMemo( () => getEnvConfigsFilteredByEnv(config.envName), - [config.envName] + [config.envName, getEnvConfigsFilteredByEnv] ); const NETWORK_SELECTOR_CHAINS_IDS = NETWORK_SELECTOR_CHAINS.map( (config) => config.chainId as ChainId @@ -128,7 +137,10 @@ export const ChainSelector = ({ } return acc; }, - { supported: [], unsupported: [] } as Record + { supported: [], unsupported: [] } as Record< + string, + CoreProtocolConfig[] + > ); return [supported, unsupported]; }, [NETWORK_SELECTOR_CHAINS, walletSupportsChain]); @@ -148,7 +160,7 @@ export const ChainSelector = ({ const [pendingConfigId, setPendingConfigId] = useState(); const onSelectChain = useCallback( - async (config: ProtocolConfig) => { + async (config: CoreProtocolConfig) => { try { setPendingConfigId(config.configId); await selectChain(config.configId); diff --git a/packages/react-kit/src/stories/ConnectWallet.stories.tsx b/packages/react-kit/src/stories/ConnectWallet.stories.tsx index eaf9335a9..6138ab565 100644 --- a/packages/react-kit/src/stories/ConnectWallet.stories.tsx +++ b/packages/react-kit/src/stories/ConnectWallet.stories.tsx @@ -30,7 +30,8 @@ const errorButtonTheme = bosonButtonThemes({ withBosonStyle: false })[ const envName = (process.env.STORYBOOK_DATA_ENV_NAME as EnvironmentType) || "testing"; const envConfig = getEnvConfigs(envName); -const configId = envConfig[0].configId; +const config = envConfig[0]; +const configId = config.configId; const ColorGlobalStyle = createGlobalStyle<{ color: CSSProperties["color"] }>` html, body{ color: ${({ color }) => color}; @@ -114,6 +115,7 @@ const Component = ({ Date: Mon, 23 Sep 2024 17:28:42 +0000 Subject: [PATCH 02/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index b1155a903..f1c462f1a 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.9", + "version": "1.7.10-alpha.0", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.1", + "@bosonprotocol/common": "^1.28.2-alpha.0", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index f0abe6983..4af177462 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.4", + "version": "1.0.5-alpha.0", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.1", + "@bosonprotocol/common": "^1.28.2-alpha.0", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index ebdaaded3..fadbbfb6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.9", + "version": "1.7.10-alpha.0", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.1", + "@bosonprotocol/common": "^1.28.2-alpha.0", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.4", + "version": "1.0.5-alpha.0", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.1", + "@bosonprotocol/common": "^1.28.2-alpha.0", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42883,7 +42883,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.28.1", + "version": "1.28.2-alpha.0", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42904,10 +42904,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.8", + "version": "1.41.0-alpha.9", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.1", + "@bosonprotocol/common": "^1.28.2-alpha.0", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42968,10 +42968,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.8", + "version": "1.6.9-alpha.0", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.1" + "@bosonprotocol/common": "^1.28.2-alpha.0" }, "devDependencies": { "eslint": "^8.10.0", @@ -42987,10 +42987,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.5", + "version": "1.14.6-alpha.0", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.1" + "@bosonprotocol/common": "^1.28.2-alpha.0" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43007,7 +43007,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.6", + "version": "1.12.0-alpha.7", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43048,13 +43048,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.6", + "version": "0.34.0-alpha.7", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.8", - "@bosonprotocol/ethers-sdk": "^1.14.5", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.6", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.9", + "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.0", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.7", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43846,7 +43846,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.8", + "version": "1.34.0-alpha.9", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index 8bb8afe05..564cf4942 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.28.1", + "version": "1.28.2-alpha.0", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 0b2f4f0e9..beffe2d0a 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.8", + "version": "1.41.0-alpha.9", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.1", + "@bosonprotocol/common": "^1.28.2-alpha.0", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index 12f847579..aa71aedf5 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.8", + "version": "1.6.9-alpha.0", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.1" + "@bosonprotocol/common": "^1.28.2-alpha.0" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index 76dde4110..68c74f912 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.5", + "version": "1.14.6-alpha.0", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.1" + "@bosonprotocol/common": "^1.28.2-alpha.0" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index 0deb8bb20..66ce314b4 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.6", + "version": "1.12.0-alpha.7", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index ca7a74d9c..cf0b0ac94 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.6", + "version": "0.34.0-alpha.7", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.8", - "@bosonprotocol/ethers-sdk": "^1.14.5", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.6", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.9", + "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.0", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.7", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 670a5014a..457ea9abf 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.8", + "version": "1.34.0-alpha.9", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From cf2525af2c9b6f48abd0d477826d240400238a27 Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com> Date: Mon, 30 Sep 2024 13:59:43 +0200 Subject: [PATCH 03/65] feat: add more props to connect wallet button to further customise its look (#798) --- .../components/wallet2/web3Status/index.tsx | 58 ++++++++++++++----- .../src/stories/ConnectWallet.stories.tsx | 30 ++++++++-- 2 files changed, 69 insertions(+), 19 deletions(-) diff --git a/packages/react-kit/src/components/wallet2/web3Status/index.tsx b/packages/react-kit/src/components/wallet2/web3Status/index.tsx index 45248a800..815981297 100644 --- a/packages/react-kit/src/components/wallet2/web3Status/index.tsx +++ b/packages/react-kit/src/components/wallet2/web3Status/index.tsx @@ -1,5 +1,5 @@ import { useWeb3React } from "@web3-react/core"; -import React, { memo, useCallback, useEffect, useRef } from "react"; +import React, { ReactNode, memo, useCallback, useEffect, useRef } from "react"; import styled from "styled-components"; import { useIsMagicLoggedIn } from "../../../hooks"; @@ -64,7 +64,17 @@ const getCommonWalletButtonProps = (isXXS: boolean) => function Web3StatusInner({ showOnlyIcon, errorButtonTheme, - successButtonTheme + connectedButtonTheme, + connectWalletButtonTheme, + connectWalletChild = <>Connect Wallet, + showStatusIcon = true, + wrongNetworkChild = <>Wrong network, + leftConnectWalletChild, + leftConnectedChild, + leftWrongNetworkChild, + rightConnectWalletChild, + rightConnectedChild, + rightWrongNetworkChild }: ConnectWalletProps) { const switchingChain = useAppSelector( (state) => state.wallets.switchingChain @@ -121,18 +131,21 @@ function Web3StatusInner({ disabled={Boolean(switchingChain)} data-testid="web3-status-connected" onClick={handleWalletDropdownClick} - theme={successButtonTheme} + theme={connectedButtonTheme} > - - + {showStatusIcon && ( + + )} + {leftConnectedChild} {ENSName || formatAddress(account)} + {rightConnectedChild} ); } @@ -163,7 +176,9 @@ function Web3StatusInner({ onClick={handleWalletDropdownClick} theme={errorButtonTheme} > - Wrong network + {leftWrongNetworkChild} + {wrongNetworkChild} + {rightWrongNetworkChild} ) : ( @@ -171,23 +186,36 @@ function Web3StatusInner({ onClick={handleWalletDropdownClick} data-testid="navbar-connect-wallet" {...getCommonWalletButtonProps(isXXS)} - theme={successButtonTheme} + theme={connectWalletButtonTheme} style={{ ...getCommonWalletButtonProps(isXXS).style }} > - Connect Wallet + {leftConnectWalletChild} + {connectWalletChild} + {rightConnectWalletChild} )} ); } +type SuccessButtonTheme = Omit & + Required>; export type ConnectWalletProps = { showOnlyIcon?: boolean; errorButtonTheme: BaseButtonTheme; - successButtonTheme: Omit & - Required>; + connectedButtonTheme: SuccessButtonTheme; + connectWalletButtonTheme: SuccessButtonTheme; + connectWalletChild?: ReactNode; + wrongNetworkChild?: ReactNode; + showStatusIcon?: boolean; + leftConnectedChild?: ReactNode; + rightConnectedChild?: ReactNode; + leftWrongNetworkChild?: ReactNode; + rightWrongNetworkChild?: ReactNode; + leftConnectWalletChild?: ReactNode; + rightConnectWalletChild?: ReactNode; }; export const ConnectWallet = memo(function Web3Status( props: ConnectWalletProps diff --git a/packages/react-kit/src/stories/ConnectWallet.stories.tsx b/packages/react-kit/src/stories/ConnectWallet.stories.tsx index 6138ab565..b7693576f 100644 --- a/packages/react-kit/src/stories/ConnectWallet.stories.tsx +++ b/packages/react-kit/src/stories/ConnectWallet.stories.tsx @@ -1,5 +1,5 @@ import { fn } from "@storybook/test"; -import React from "react"; +import React, { ReactNode } from "react"; import { Meta } from "@storybook/react"; import { ChainSelector, @@ -17,8 +17,9 @@ import { import { HashRouter, Route, Routes } from "react-router-dom"; import { bosonButtonThemeKeys } from "../components/ui/ThemedButton"; import { CSSProperties, createGlobalStyle } from "styled-components"; +import { Wallet } from "phosphor-react"; const colors = theme.colors.light; -const successButtonTheme: ConnectWalletProps["successButtonTheme"] = { +const successButtonTheme: ConnectWalletProps["connectWalletButtonTheme"] = { ...bosonButtonThemes({ withBosonStyle: false })["primary"], color: "inherit", background: "var(--buttonBgColor)" @@ -38,6 +39,9 @@ const ColorGlobalStyle = createGlobalStyle<{ color: CSSProperties["color"] }>` } `; const Component = ({ + showStatusIcon, + rightConnectedChild, + connectWalletChild, textColor, chainSelectorBackgroundColor, connectWalletBorderRadius, @@ -59,7 +63,10 @@ const Component = ({ magicLoginButtonBorderRadiusPx, onUserDisconnect }: { + showStatusIcon: boolean; + rightConnectedChild?: ReactNode; textColor: string; + connectWalletChild: string; chainSelectorBackgroundColor: string | undefined; connectWalletBorderRadius: string | undefined; connectWalletSuccessButtonThemeKey: string | undefined; @@ -118,7 +125,19 @@ const Component = ({ config={config} /> Connect, + rightConnectedChild: } }; From 8623afeb07a6e23445ba6559e7d7474e4b01cd76 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 30 Sep 2024 12:03:26 +0000 Subject: [PATCH 04/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index f1c462f1a..000ac5854 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.0", + "version": "1.7.10-alpha.1", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.0", + "@bosonprotocol/common": "^1.28.2-alpha.1", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index 4af177462..3a0e2e9a5 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.0", + "version": "1.0.5-alpha.1", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.0", + "@bosonprotocol/common": "^1.28.2-alpha.1", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index fadbbfb6d..b56e5858f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.0", + "version": "1.7.10-alpha.1", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.0", + "@bosonprotocol/common": "^1.28.2-alpha.1", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.0", + "version": "1.0.5-alpha.1", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.0", + "@bosonprotocol/common": "^1.28.2-alpha.1", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42883,7 +42883,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.28.2-alpha.0", + "version": "1.28.2-alpha.1", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42904,10 +42904,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.9", + "version": "1.41.0-alpha.10", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.0", + "@bosonprotocol/common": "^1.28.2-alpha.1", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42968,10 +42968,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.9-alpha.0", + "version": "1.6.9-alpha.1", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.0" + "@bosonprotocol/common": "^1.28.2-alpha.1" }, "devDependencies": { "eslint": "^8.10.0", @@ -42987,10 +42987,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.6-alpha.0", + "version": "1.14.6-alpha.1", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.0" + "@bosonprotocol/common": "^1.28.2-alpha.1" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43007,7 +43007,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.7", + "version": "1.12.0-alpha.8", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43048,13 +43048,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.7", + "version": "0.34.0-alpha.8", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.9", - "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.0", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.7", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.10", + "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.1", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.8", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43846,7 +43846,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.9", + "version": "1.34.0-alpha.10", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index 564cf4942..865619432 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.28.2-alpha.0", + "version": "1.28.2-alpha.1", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index beffe2d0a..600c3cf2b 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.9", + "version": "1.41.0-alpha.10", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.0", + "@bosonprotocol/common": "^1.28.2-alpha.1", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index aa71aedf5..63a97defb 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.9-alpha.0", + "version": "1.6.9-alpha.1", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.0" + "@bosonprotocol/common": "^1.28.2-alpha.1" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index 68c74f912..e8603a827 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.6-alpha.0", + "version": "1.14.6-alpha.1", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.0" + "@bosonprotocol/common": "^1.28.2-alpha.1" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index 66ce314b4..b93bca207 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.7", + "version": "1.12.0-alpha.8", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index cf0b0ac94..303a7f2b2 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.7", + "version": "0.34.0-alpha.8", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.9", - "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.0", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.7", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.10", + "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.1", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.8", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 457ea9abf..e05bb3e5c 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.9", + "version": "1.34.0-alpha.10", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From 856c0f9cc331a87ccd393536c2ace9e38b42b734 Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:49:25 +0200 Subject: [PATCH 05/65] chore: export drawer hooks (#799) --- packages/react-kit/src/components/connection/utils.ts | 1 - packages/react-kit/src/hooks/index.ts | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/react-kit/src/components/connection/utils.ts b/packages/react-kit/src/components/connection/utils.ts index be7a8143e..303015d8a 100644 --- a/packages/react-kit/src/components/connection/utils.ts +++ b/packages/react-kit/src/components/connection/utils.ts @@ -19,7 +19,6 @@ const InjectedWalletTable: { isBraveWallet: { name: "Brave", icon: BRAVE_ICON }, isRabby: { name: "Rabby", icon: RABBY_ICON }, isTrust: { name: "Trust Wallet", icon: TRUST_WALLET_ICON }, - // @ts-expect-error this was like this in the dapp, TODO: check if this can be deleted isLedgerConnect: { name: "Ledger", icon: LEDGER_ICON } }; diff --git a/packages/react-kit/src/hooks/index.ts b/packages/react-kit/src/hooks/index.ts index 8642bea8d..5724fe975 100644 --- a/packages/react-kit/src/hooks/index.ts +++ b/packages/react-kit/src/hooks/index.ts @@ -28,3 +28,9 @@ export * from "./useBreakpoints"; export * from "./useSignerAddress"; export * from "./useMetaTx"; export { useCtaClickHandler } from "./useCtaClickHandler"; +export { + useToggleAccountDrawer, + useAccountDrawer, + useCloseAccountDrawer, + useOpenAccountDrawer +} from "../components/wallet2/accountDrawer/index"; From 9f9352faf2fd2ac0a8089581308957f66298695a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 1 Oct 2024 11:53:07 +0000 Subject: [PATCH 06/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index 000ac5854..7b8dca830 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.1", + "version": "1.7.10-alpha.2", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.1", + "@bosonprotocol/common": "^1.28.2-alpha.2", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index 3a0e2e9a5..cd50ebe9a 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.1", + "version": "1.0.5-alpha.2", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.1", + "@bosonprotocol/common": "^1.28.2-alpha.2", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index b56e5858f..b11586882 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.1", + "version": "1.7.10-alpha.2", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.1", + "@bosonprotocol/common": "^1.28.2-alpha.2", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.1", + "version": "1.0.5-alpha.2", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.1", + "@bosonprotocol/common": "^1.28.2-alpha.2", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42883,7 +42883,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.28.2-alpha.1", + "version": "1.28.2-alpha.2", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42904,10 +42904,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.10", + "version": "1.41.0-alpha.11", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.1", + "@bosonprotocol/common": "^1.28.2-alpha.2", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42968,10 +42968,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.9-alpha.1", + "version": "1.6.9-alpha.2", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.1" + "@bosonprotocol/common": "^1.28.2-alpha.2" }, "devDependencies": { "eslint": "^8.10.0", @@ -42987,10 +42987,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.6-alpha.1", + "version": "1.14.6-alpha.2", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.1" + "@bosonprotocol/common": "^1.28.2-alpha.2" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43007,7 +43007,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.8", + "version": "1.12.0-alpha.9", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43048,13 +43048,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.8", + "version": "0.34.0-alpha.9", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.10", - "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.1", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.8", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.11", + "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.2", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.9", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43846,7 +43846,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.10", + "version": "1.34.0-alpha.11", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index 865619432..9e25d45f2 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.28.2-alpha.1", + "version": "1.28.2-alpha.2", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 600c3cf2b..8e3e28332 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.10", + "version": "1.41.0-alpha.11", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.1", + "@bosonprotocol/common": "^1.28.2-alpha.2", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index 63a97defb..029c260d5 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.9-alpha.1", + "version": "1.6.9-alpha.2", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.1" + "@bosonprotocol/common": "^1.28.2-alpha.2" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index e8603a827..856e5d590 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.6-alpha.1", + "version": "1.14.6-alpha.2", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.1" + "@bosonprotocol/common": "^1.28.2-alpha.2" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index b93bca207..dca4bd8a3 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.8", + "version": "1.12.0-alpha.9", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 303a7f2b2..1e493f1f1 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.8", + "version": "0.34.0-alpha.9", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.10", - "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.1", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.8", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.11", + "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.2", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.9", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index e05bb3e5c..4329aa742 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.10", + "version": "1.34.0-alpha.11", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From 7f92ec21c45e3740b7e28b28ed2a7b102aca0dcf Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com> Date: Tue, 1 Oct 2024 14:36:30 +0200 Subject: [PATCH 07/65] chore: export usePrevious hook (#800) --- packages/react-kit/src/hooks/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-kit/src/hooks/index.ts b/packages/react-kit/src/hooks/index.ts index 5724fe975..fdb785362 100644 --- a/packages/react-kit/src/hooks/index.ts +++ b/packages/react-kit/src/hooks/index.ts @@ -34,3 +34,4 @@ export { useCloseAccountDrawer, useOpenAccountDrawer } from "../components/wallet2/accountDrawer/index"; +export * from "./usePrevious"; From 24befbd14399a4860f589b8aff7c0ededeccda24 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 1 Oct 2024 12:39:45 +0000 Subject: [PATCH 08/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index 7b8dca830..d0fc7a0de 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.2", + "version": "1.7.10-alpha.3", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.2", + "@bosonprotocol/common": "^1.28.2-alpha.3", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index cd50ebe9a..0a3a36e3c 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.2", + "version": "1.0.5-alpha.3", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.2", + "@bosonprotocol/common": "^1.28.2-alpha.3", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index b11586882..778e66e92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.2", + "version": "1.7.10-alpha.3", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.2", + "@bosonprotocol/common": "^1.28.2-alpha.3", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.2", + "version": "1.0.5-alpha.3", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.2", + "@bosonprotocol/common": "^1.28.2-alpha.3", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42883,7 +42883,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.28.2-alpha.2", + "version": "1.28.2-alpha.3", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42904,10 +42904,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.11", + "version": "1.41.0-alpha.12", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.2", + "@bosonprotocol/common": "^1.28.2-alpha.3", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42968,10 +42968,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.9-alpha.2", + "version": "1.6.9-alpha.3", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.2" + "@bosonprotocol/common": "^1.28.2-alpha.3" }, "devDependencies": { "eslint": "^8.10.0", @@ -42987,10 +42987,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.6-alpha.2", + "version": "1.14.6-alpha.3", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.2" + "@bosonprotocol/common": "^1.28.2-alpha.3" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43007,7 +43007,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.9", + "version": "1.12.0-alpha.10", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43048,13 +43048,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.9", + "version": "0.34.0-alpha.10", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.11", - "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.2", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.9", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.12", + "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.3", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.10", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43846,7 +43846,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.11", + "version": "1.34.0-alpha.12", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index 9e25d45f2..e6cb6c11d 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.28.2-alpha.2", + "version": "1.28.2-alpha.3", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 8e3e28332..e94300a20 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.11", + "version": "1.41.0-alpha.12", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.2", + "@bosonprotocol/common": "^1.28.2-alpha.3", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index 029c260d5..0f024f768 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.9-alpha.2", + "version": "1.6.9-alpha.3", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.2" + "@bosonprotocol/common": "^1.28.2-alpha.3" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index 856e5d590..96670d962 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.6-alpha.2", + "version": "1.14.6-alpha.3", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.2" + "@bosonprotocol/common": "^1.28.2-alpha.3" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index dca4bd8a3..9725a4224 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.9", + "version": "1.12.0-alpha.10", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 1e493f1f1..af84444de 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.9", + "version": "0.34.0-alpha.10", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.11", - "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.2", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.9", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.12", + "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.3", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.10", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 4329aa742..9c03641a4 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.11", + "version": "1.34.0-alpha.12", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From 0926e31334ce8e4f3c1bc6baee309677c7711ce1 Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:58:59 +0200 Subject: [PATCH 09/65] feat: add onOptionClick to accountDrawer (#801) --- .../src/components/wallet2/walletModal/Option.tsx | 11 +++++++++-- .../src/components/wallet2/walletModal/index.tsx | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/react-kit/src/components/wallet2/walletModal/Option.tsx b/packages/react-kit/src/components/wallet2/walletModal/Option.tsx index 38683ffcb..e26bc9f56 100644 --- a/packages/react-kit/src/components/wallet2/walletModal/Option.tsx +++ b/packages/react-kit/src/components/wallet2/walletModal/Option.tsx @@ -110,6 +110,9 @@ export interface OptionProps { hoverColor: CSSProperties["color"]; backgroundColor: CSSProperties["backgroundColor"]; borderRadius: CSSProperties["borderRadius"]; + onOptionClick?: (arg0: { + activationState: ReturnType["activationState"]; + }) => void; } export function Option({ connection, @@ -117,7 +120,8 @@ export function Option({ hoverFocusBackgroundColor, hoverColor, backgroundColor, - borderRadius + borderRadius, + onOptionClick }: OptionProps) { const { activationState, tryActivation } = useActivationState(); const toggleAccountDrawer = useToggleAccountDrawer(); @@ -139,7 +143,10 @@ export function Option({ > { + activate(); + onOptionClick?.({ activationState }); + }} selected={isCurrentOptionPending} data-testid={`wallet-option-${connection.type}`} > diff --git a/packages/react-kit/src/components/wallet2/walletModal/index.tsx b/packages/react-kit/src/components/wallet2/walletModal/index.tsx index 5aa0d6e7e..ecdc209f8 100644 --- a/packages/react-kit/src/components/wallet2/walletModal/index.tsx +++ b/packages/react-kit/src/components/wallet2/walletModal/index.tsx @@ -47,6 +47,7 @@ export type WalletModalProps = { | "hoverColor" | "backgroundColor" | "borderRadius" + | "onOptionClick" > & { iconBorderRadius: CSSProperties["borderRadius"] }; }; export function WalletModal({ From 38cb59792558bfb9e93a1c4fb818d125aa9de017 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 1 Oct 2024 16:02:16 +0000 Subject: [PATCH 10/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index d0fc7a0de..29fa0acac 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.3", + "version": "1.7.10-alpha.4", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.3", + "@bosonprotocol/common": "^1.28.2-alpha.4", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index 0a3a36e3c..3c7d83471 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.3", + "version": "1.0.5-alpha.4", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.3", + "@bosonprotocol/common": "^1.28.2-alpha.4", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index 778e66e92..6c373ea89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.3", + "version": "1.7.10-alpha.4", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.3", + "@bosonprotocol/common": "^1.28.2-alpha.4", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.3", + "version": "1.0.5-alpha.4", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.3", + "@bosonprotocol/common": "^1.28.2-alpha.4", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42883,7 +42883,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.28.2-alpha.3", + "version": "1.28.2-alpha.4", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42904,10 +42904,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.12", + "version": "1.41.0-alpha.13", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.3", + "@bosonprotocol/common": "^1.28.2-alpha.4", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42968,10 +42968,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.9-alpha.3", + "version": "1.6.9-alpha.4", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.3" + "@bosonprotocol/common": "^1.28.2-alpha.4" }, "devDependencies": { "eslint": "^8.10.0", @@ -42987,10 +42987,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.6-alpha.3", + "version": "1.14.6-alpha.4", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.3" + "@bosonprotocol/common": "^1.28.2-alpha.4" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43007,7 +43007,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.10", + "version": "1.12.0-alpha.11", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43048,13 +43048,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.10", + "version": "0.34.0-alpha.11", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.12", - "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.3", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.10", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.13", + "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.4", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.11", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43846,7 +43846,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.12", + "version": "1.34.0-alpha.13", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index e6cb6c11d..e853431e6 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.28.2-alpha.3", + "version": "1.28.2-alpha.4", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index e94300a20..d0a39e45d 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.12", + "version": "1.41.0-alpha.13", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.3", + "@bosonprotocol/common": "^1.28.2-alpha.4", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index 0f024f768..b26faf6f8 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.9-alpha.3", + "version": "1.6.9-alpha.4", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.3" + "@bosonprotocol/common": "^1.28.2-alpha.4" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index 96670d962..52c1f56cc 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.6-alpha.3", + "version": "1.14.6-alpha.4", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.3" + "@bosonprotocol/common": "^1.28.2-alpha.4" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index 9725a4224..e0872e9df 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.10", + "version": "1.12.0-alpha.11", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index af84444de..852aaf369 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.10", + "version": "0.34.0-alpha.11", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.12", - "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.3", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.10", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.13", + "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.4", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.11", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 9c03641a4..3596d697d 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.12", + "version": "1.34.0-alpha.13", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From 3be665b1dca4249c627b89eb76bc6b61a914b2f0 Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Fri, 4 Oct 2024 16:13:36 +0100 Subject: [PATCH 11/65] feat: add estimateGas in Web3LibAdapter (#803) * feat: add estimateGas in Web3LibAdapter * fix lint * fix test --- packages/common/src/types/web3-lib-adapter.ts | 1 + packages/common/tests/mocks.ts | 4 ++++ packages/eth-connect-sdk/src/eth-connect-adapter.ts | 9 +++++++++ packages/ethers-sdk/src/ethers-adapter.ts | 6 ++++++ packages/react-kit/src/lib/signer/externalSigner.ts | 7 +++++++ 5 files changed, 27 insertions(+) diff --git a/packages/common/src/types/web3-lib-adapter.ts b/packages/common/src/types/web3-lib-adapter.ts index d0ac65d6d..6924e231a 100644 --- a/packages/common/src/types/web3-lib-adapter.ts +++ b/packages/common/src/types/web3-lib-adapter.ts @@ -39,6 +39,7 @@ export interface Web3LibAdapter { addressOrName: string, blockNumber?: string | number ): Promise; + estimateGas(transactionRequest: TransactionRequest): Promise; sendTransaction( transactionRequest: TransactionRequest ): Promise; diff --git a/packages/common/tests/mocks.ts b/packages/common/tests/mocks.ts index f6700607a..554e65207 100644 --- a/packages/common/tests/mocks.ts +++ b/packages/common/tests/mocks.ts @@ -182,6 +182,10 @@ export class MockWeb3LibAdapter implements Web3LibAdapter { return this._returnValues.getBalance; } + async estimateGas() { + return 1234; + } + async sendTransaction(args: TransactionRequest) { this.sendTransactionArgs.push(args); return this._returnValues.sendTransaction; diff --git a/packages/eth-connect-sdk/src/eth-connect-adapter.ts b/packages/eth-connect-sdk/src/eth-connect-adapter.ts index 971bba213..43fc904ba 100644 --- a/packages/eth-connect-sdk/src/eth-connect-adapter.ts +++ b/packages/eth-connect-sdk/src/eth-connect-adapter.ts @@ -105,6 +105,15 @@ export class EthConnectAdapter implements Web3LibAdapter { ); } + public async estimateGas( + transactionRequest: TransactionRequest + ): Promise { + return this._requestManager.eth_estimateGas({ + data: transactionRequest.data, + to: transactionRequest.to + }); + } + public async send(rpcMethod: string, payload: unknown[]): Promise { // Use requestManagerSigner to (sign and) send transaction return this._requestManagerSigner.sendAsync({ diff --git a/packages/ethers-sdk/src/ethers-adapter.ts b/packages/ethers-sdk/src/ethers-adapter.ts index f11337abb..7858e00b5 100644 --- a/packages/ethers-sdk/src/ethers-adapter.ts +++ b/packages/ethers-sdk/src/ethers-adapter.ts @@ -61,6 +61,12 @@ export class EthersAdapter implements Web3LibAdapter { return this._provider.getBalance(addressOrName, blockNumber); } + public async estimateGas( + transactionRequest: TransactionRequest + ): Promise { + return this._signer.estimateGas(transactionRequest); + } + public async sendTransaction( transactionRequest: TransactionRequest ): Promise { diff --git a/packages/react-kit/src/lib/signer/externalSigner.ts b/packages/react-kit/src/lib/signer/externalSigner.ts index b0c86a47d..6a52b6dc9 100644 --- a/packages/react-kit/src/lib/signer/externalSigner.ts +++ b/packages/react-kit/src/lib/signer/externalSigner.ts @@ -152,6 +152,13 @@ const getExternalWeb3LibAdapterListener = ({ ); }); }, + estimateGas: async (...args: any[]): Promise => { + return getDefaultHandleSignerFunction({ + parentOrigin, + functionName: "estimateGas", + args + }); + }, call: async (...args: any[]): Promise => { return getDefaultHandleSignerFunction({ parentOrigin, From d17366efc296ff9782f92ecdc16742a80a223169 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 4 Oct 2024 15:17:36 +0000 Subject: [PATCH 12/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index 29fa0acac..c0781bcb0 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.4", + "version": "1.7.10-alpha.5", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.0", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index 3c7d83471..6f5fb2c10 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.4", + "version": "1.0.5-alpha.5", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.0", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index 6c373ea89..3918c7860 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.4", + "version": "1.7.10-alpha.5", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.0", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.4", + "version": "1.0.5-alpha.5", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.0", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42883,7 +42883,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.28.2-alpha.4", + "version": "1.29.0-alpha.0", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42904,10 +42904,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.13", + "version": "1.41.0-alpha.14", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.0", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42968,10 +42968,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.9-alpha.4", + "version": "1.7.0-alpha.0", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.4" + "@bosonprotocol/common": "^1.29.0-alpha.0" }, "devDependencies": { "eslint": "^8.10.0", @@ -42987,10 +42987,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.6-alpha.4", + "version": "1.15.0-alpha.0", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.4" + "@bosonprotocol/common": "^1.29.0-alpha.0" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43007,7 +43007,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.11", + "version": "1.12.0-alpha.12", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43048,13 +43048,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.11", + "version": "0.34.0-alpha.12", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.13", - "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.4", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.11", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.14", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.0", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.12", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43846,7 +43846,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.13", + "version": "1.34.0-alpha.14", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index e853431e6..a1f054caf 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.28.2-alpha.4", + "version": "1.29.0-alpha.0", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index d0a39e45d..e7c394bdb 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.13", + "version": "1.41.0-alpha.14", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.0", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index b26faf6f8..203513656 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.9-alpha.4", + "version": "1.7.0-alpha.0", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.4" + "@bosonprotocol/common": "^1.29.0-alpha.0" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index 52c1f56cc..aa86b8f44 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.6-alpha.4", + "version": "1.15.0-alpha.0", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.28.2-alpha.4" + "@bosonprotocol/common": "^1.29.0-alpha.0" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index e0872e9df..2777f0903 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.11", + "version": "1.12.0-alpha.12", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 852aaf369..1d5eedb69 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.11", + "version": "0.34.0-alpha.12", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.13", - "@bosonprotocol/ethers-sdk": "^1.14.6-alpha.4", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.11", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.14", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.0", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.12", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 3596d697d..43a5eb6e6 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.13", + "version": "1.34.0-alpha.14", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From 2857edd840a9ff95287b00c2c19943621c69ee56 Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com> Date: Mon, 7 Oct 2024 09:43:02 +0200 Subject: [PATCH 13/65] feat: add prop to disable magic link (#804) --- .../react-kit/src/components/wallet2/walletModal/index.tsx | 6 ++++-- .../react-kit/src/hooks/connection/useSyncChainQuery.ts | 2 +- packages/react-kit/src/stories/ConnectWallet.stories.tsx | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/react-kit/src/components/wallet2/walletModal/index.tsx b/packages/react-kit/src/components/wallet2/walletModal/index.tsx index ecdc209f8..6313a3371 100644 --- a/packages/react-kit/src/components/wallet2/walletModal/index.tsx +++ b/packages/react-kit/src/components/wallet2/walletModal/index.tsx @@ -49,11 +49,13 @@ export type WalletModalProps = { | "borderRadius" | "onOptionClick" > & { iconBorderRadius: CSSProperties["borderRadius"] }; + withMagicLogin?: boolean; }; export function WalletModal({ PrivacyPolicy, magicLoginButtonProps, - optionProps + optionProps, + withMagicLogin = true }: WalletModalProps) { const chainId = useChainId(); const { config } = useConfigContext(); @@ -101,7 +103,7 @@ export function WalletModal({ /> ))} - + {withMagicLogin && } )} diff --git a/packages/react-kit/src/hooks/connection/useSyncChainQuery.ts b/packages/react-kit/src/hooks/connection/useSyncChainQuery.ts index 947448211..28ad420e1 100644 --- a/packages/react-kit/src/hooks/connection/useSyncChainQuery.ts +++ b/packages/react-kit/src/hooks/connection/useSyncChainQuery.ts @@ -35,7 +35,7 @@ export default function useSyncChainQuery() { const parsedQs = useParsedQueryString(); const configIdRef = useRef(currentConfigId); const accountRef = useRef(account); - const accountAlreadyConnected = useRef(account); + const accountAlreadyConnected = useRef(account); const disconnect = useCallback(() => { accountAlreadyConnected.current = undefined; _disconnect({ isUserDisconnecting: false }); diff --git a/packages/react-kit/src/stories/ConnectWallet.stories.tsx b/packages/react-kit/src/stories/ConnectWallet.stories.tsx index b7693576f..b8f0d5341 100644 --- a/packages/react-kit/src/stories/ConnectWallet.stories.tsx +++ b/packages/react-kit/src/stories/ConnectWallet.stories.tsx @@ -61,6 +61,7 @@ const Component = ({ walletHoverColor, magicLoginButtonThemeKey, magicLoginButtonBorderRadiusPx, + withMagicLogin, onUserDisconnect }: { showStatusIcon: boolean; @@ -85,6 +86,7 @@ const Component = ({ walletHoverColor: string | undefined; magicLoginButtonThemeKey: string | undefined; magicLoginButtonBorderRadiusPx: string | undefined; + withMagicLogin: boolean | undefined; onUserDisconnect: () => unknown; }) => { return ( @@ -175,6 +177,7 @@ const Component = ({ disconnectColor={accountDrawerDisconnectColor} onUserDisconnect={onUserDisconnect} walletModalProps={{ + withMagicLogin, optionProps: { backgroundColor: walletBackgroundColor, color: walletColor, @@ -305,6 +308,7 @@ export const CustomTheme = { walletHoverColor: "#ff0000", magicLoginButtonThemeKey: "orangeInverse", magicLoginButtonBorderRadiusPx: "50", + withMagicLogin: true, showStatusIcon: false, connectWalletChild: <>Connect, rightConnectedChild: From 9127cc35acf03b19f3bf71b37823e7b8e168ee53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 7 Oct 2024 07:46:21 +0000 Subject: [PATCH 14/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index c0781bcb0..cf8b3dc17 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.5", + "version": "1.7.10-alpha.6", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.0", + "@bosonprotocol/common": "^1.29.0-alpha.1", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index 6f5fb2c10..016a44c3c 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.5", + "version": "1.0.5-alpha.6", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.0", + "@bosonprotocol/common": "^1.29.0-alpha.1", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index 3918c7860..f79d44c49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.5", + "version": "1.7.10-alpha.6", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.0", + "@bosonprotocol/common": "^1.29.0-alpha.1", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.5", + "version": "1.0.5-alpha.6", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.0", + "@bosonprotocol/common": "^1.29.0-alpha.1", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42883,7 +42883,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.0", + "version": "1.29.0-alpha.1", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42904,10 +42904,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.14", + "version": "1.41.0-alpha.15", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.0", + "@bosonprotocol/common": "^1.29.0-alpha.1", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42968,10 +42968,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.0", + "version": "1.7.0-alpha.1", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.0" + "@bosonprotocol/common": "^1.29.0-alpha.1" }, "devDependencies": { "eslint": "^8.10.0", @@ -42987,10 +42987,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.0", + "version": "1.15.0-alpha.1", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.0" + "@bosonprotocol/common": "^1.29.0-alpha.1" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43007,7 +43007,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.12", + "version": "1.12.0-alpha.13", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43048,13 +43048,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.12", + "version": "0.34.0-alpha.13", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.14", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.0", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.12", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.15", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.1", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.13", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43846,7 +43846,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.14", + "version": "1.34.0-alpha.15", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index a1f054caf..1d0da990d 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.0", + "version": "1.29.0-alpha.1", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index e7c394bdb..185758ea9 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.14", + "version": "1.41.0-alpha.15", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.0", + "@bosonprotocol/common": "^1.29.0-alpha.1", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index 203513656..ebae71067 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.0", + "version": "1.7.0-alpha.1", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.0" + "@bosonprotocol/common": "^1.29.0-alpha.1" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index aa86b8f44..9d2759f02 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.0", + "version": "1.15.0-alpha.1", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.0" + "@bosonprotocol/common": "^1.29.0-alpha.1" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index 2777f0903..c25e2c167 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.12", + "version": "1.12.0-alpha.13", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 1d5eedb69..560ef29d2 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.12", + "version": "0.34.0-alpha.13", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.14", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.0", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.12", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.15", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.1", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.13", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 43a5eb6e6..3889f5cfa 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.14", + "version": "1.34.0-alpha.15", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From ae1a69acdf56cf3837973801e02ed1e00987ea13 Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:16:28 +0200 Subject: [PATCH 15/65] feat: add default tokens to account drawer and themes to connection error view (#806) --- .../accountDrawer/AuthenticatedHeader.tsx | 11 +++---- .../accountDrawer/miniPortfolio/index.tsx | 12 ++++--- .../miniPortfolio/tokens/index.tsx | 10 ++++-- .../walletModal/ConnectionErrorView.tsx | 27 ++++++++++++---- .../components/wallet2/walletModal/index.tsx | 10 ++++-- .../src/stories/ConnectWallet.stories.tsx | 31 ++++++++++++++++++- 6 files changed, 79 insertions(+), 22 deletions(-) diff --git a/packages/react-kit/src/components/wallet2/accountDrawer/AuthenticatedHeader.tsx b/packages/react-kit/src/components/wallet2/accountDrawer/AuthenticatedHeader.tsx index 898dfdb37..0a01f0409 100644 --- a/packages/react-kit/src/components/wallet2/accountDrawer/AuthenticatedHeader.tsx +++ b/packages/react-kit/src/components/wallet2/accountDrawer/AuthenticatedHeader.tsx @@ -9,13 +9,12 @@ import { } from "phosphor-react"; import React, { useCallback, useState } from "react"; import styled, { CSSProperties } from "styled-components"; - import { Typography } from "../../ui/Typography"; import StatusIcon from "../identicon/StatusIcon"; import { FiatLink, useFiatLinkContext } from "./fiatOnrampModal/FiatLink"; // import FiatOnrampModal from "./fiatOnrampModal"; import { IconWithConfirmTextButton } from "./IconButton"; -import MiniPortfolio from "./miniPortfolio"; +import MiniPortfolio, { MiniPortfolioProps } from "./miniPortfolio"; import { Column } from "../../ui/column"; import { theme } from "../../../theme"; import { useENSName } from "../../../hooks/ens/useENSName"; @@ -131,8 +130,7 @@ export function PortfolioArrow({ ); } -export type AuthenticatedHeaderProps = { - account: string; +export type AuthenticatedHeaderProps = MiniPortfolioProps & { onUserDisconnect?: () => unknown; disconnectColor: CSSProperties["color"]; disconnectBackgroundColor: CSSProperties["backgroundColor"]; @@ -145,7 +143,8 @@ export function AuthenticatedHeader({ disconnectColor, disconnectBackgroundColor, disconnectBorderRadius, - buyCryptoTheme + buyCryptoTheme, + defaultTokens }: AuthenticatedHeaderProps) { const { connector } = useWeb3React(); const { ENSName } = useENSName(account); @@ -292,7 +291,7 @@ export function AuthenticatedHeader({ )} - + ); diff --git a/packages/react-kit/src/components/wallet2/accountDrawer/miniPortfolio/index.tsx b/packages/react-kit/src/components/wallet2/accountDrawer/miniPortfolio/index.tsx index c9cd91bfb..a3868030a 100644 --- a/packages/react-kit/src/components/wallet2/accountDrawer/miniPortfolio/index.tsx +++ b/packages/react-kit/src/components/wallet2/accountDrawer/miniPortfolio/index.tsx @@ -3,7 +3,7 @@ import styled from "styled-components"; import { Grid } from "../../../ui/Grid"; import { Typography } from "../../../ui/Typography"; -import Tokens from "./tokens"; +import Tokens, { TokensProps } from "./tokens"; import { breakpointNumbers } from "../../../../lib/ui/breakpoint"; import { Column } from "../../../ui/column"; @@ -41,7 +41,7 @@ const PageWrapper = styled.div` interface Page { title: React.ReactNode; key: string; - component: ({ account }: { account: string }) => JSX.Element; + component: ({ account }: MiniPortfolioProps) => JSX.Element; } const Pages: Array = [ @@ -52,7 +52,11 @@ const Pages: Array = [ } ]; -export default function MiniPortfolio({ account }: { account: string }) { +export type MiniPortfolioProps = TokensProps; +export default function MiniPortfolio({ + account, + defaultTokens +}: MiniPortfolioProps) { const [currentPage, setCurrentPage] = useState(0); const { component: Page } = Pages[currentPage]; @@ -72,7 +76,7 @@ export default function MiniPortfolio({ account }: { account: string }) { })} - + ); diff --git a/packages/react-kit/src/components/wallet2/accountDrawer/miniPortfolio/tokens/index.tsx b/packages/react-kit/src/components/wallet2/accountDrawer/miniPortfolio/tokens/index.tsx index 23bac04a2..3862ce883 100644 --- a/packages/react-kit/src/components/wallet2/accountDrawer/miniPortfolio/tokens/index.tsx +++ b/packages/react-kit/src/components/wallet2/accountDrawer/miniPortfolio/tokens/index.tsx @@ -1,4 +1,5 @@ import React from "react"; +import { Token as TokenType } from "@bosonprotocol/common"; import { Token } from "@uniswap/sdk-core"; import { ethers } from "ethers"; import styled from "styled-components"; @@ -20,11 +21,16 @@ import { import { nativeOnChain } from "../../../../../lib/const/tokens"; import { PortfolioLogo } from "../../../../logo/PortfolioLogo"; -export default function Tokens({ account }: { account: string }) { +export type TokensProps = { + account: string; + defaultTokens?: TokenType[]; +}; +export default function Tokens({ account, defaultTokens }: TokensProps) { const chainId = useChainId(); const { data: tokenBalances, isLoading } = useTokenBalances({ address: account, - chainId + chainId, + tokens: defaultTokens }); if (!chainId || isLoading) { diff --git a/packages/react-kit/src/components/wallet2/walletModal/ConnectionErrorView.tsx b/packages/react-kit/src/components/wallet2/walletModal/ConnectionErrorView.tsx index 1f7539eb6..5558f6724 100644 --- a/packages/react-kit/src/components/wallet2/walletModal/ConnectionErrorView.tsx +++ b/packages/react-kit/src/components/wallet2/walletModal/ConnectionErrorView.tsx @@ -5,12 +5,13 @@ import styled from "styled-components"; import { Typography } from "../../ui/Typography"; import { useCloseAccountDrawer } from "../accountDrawer"; import { flexColumnNoWrap } from "../styles"; -import { Button } from "../../buttons/Button"; import { ActivationStatus, useActivationState } from "../../connection/activate"; import { theme } from "../../../theme"; +import { Grid } from "../../ui/Grid"; +import { BaseButton, BaseButtonProps } from "../../buttons/BaseButton"; const colors = theme.colors.light; const Wrapper = styled.div` ${flexColumnNoWrap}; @@ -27,8 +28,15 @@ const AlertTriangleIcon = styled(Warning)` color: ${colors.red}; `; +export type ConnectionErrorViewProps = { + tryAgainTheme: BaseButtonProps["theme"]; + backToWalletSelectionTheme: BaseButtonProps["theme"]; +}; // TODO(cartcrom): move this to a top level modal, rather than inline in the drawer -export default function ConnectionErrorView() { +export default function ConnectionErrorView({ + tryAgainTheme, + backToWalletSelectionTheme +}: ConnectionErrorViewProps) { const { activationState, tryActivation, cancelActivation } = useActivationState(); const closeDrawer = useCloseAccountDrawer(); @@ -50,10 +58,17 @@ export default function ConnectionErrorView() { The connection attempt failed. Please click try again and follow the steps to connect in your wallet. - - + + + Try Again + + + Back to wallet selection + + ); } diff --git a/packages/react-kit/src/components/wallet2/walletModal/index.tsx b/packages/react-kit/src/components/wallet2/walletModal/index.tsx index 6313a3371..01067cfab 100644 --- a/packages/react-kit/src/components/wallet2/walletModal/index.tsx +++ b/packages/react-kit/src/components/wallet2/walletModal/index.tsx @@ -5,7 +5,9 @@ import styled, { CSSProperties } from "styled-components"; import { Grid } from "../../ui/Grid"; import { flexColumnNoWrap } from "../styles"; -import ConnectionErrorView from "./ConnectionErrorView"; +import ConnectionErrorView, { + ConnectionErrorViewProps +} from "./ConnectionErrorView"; import { Option, OptionProps } from "./Option"; import { ActivationStatus, @@ -50,12 +52,14 @@ export type WalletModalProps = { | "onOptionClick" > & { iconBorderRadius: CSSProperties["borderRadius"] }; withMagicLogin?: boolean; + connectionErrorProps: ConnectionErrorViewProps; }; export function WalletModal({ PrivacyPolicy, magicLoginButtonProps, optionProps, - withMagicLogin = true + withMagicLogin = true, + connectionErrorProps }: WalletModalProps) { const chainId = useChainId(); const { config } = useConfigContext(); @@ -85,7 +89,7 @@ export function WalletModal({ Connect a wallet {activationState.status === ActivationStatus.ERROR ? ( - + ) : ( unknown; @@ -199,6 +203,19 @@ const Component = ({ } } }, + connectionErrorProps: { + tryAgainTheme: connectionErrorTryAgainButtonThemeKey + ? bosonButtonThemes({ withBosonStyle: false })[ + connectionErrorTryAgainButtonThemeKey + ] + : successButtonTheme, + backToWalletSelectionTheme: + connectionErrorBackToWalletSelectionButtonThemeKey + ? bosonButtonThemes({ withBosonStyle: false })[ + connectionErrorBackToWalletSelectionButtonThemeKey + ] + : successButtonTheme + }, PrivacyPolicy: () =>
privacy policy
}} /> @@ -248,6 +265,14 @@ export default { magicLoginButtonThemeKey: { control: "select", options: bosonButtonThemeKeys + }, + connectionErrorTryAgainButtonThemeKey: { + control: "select", + options: bosonButtonThemeKeys + }, + connectionErrorBackToWalletSelectionButtonThemeKey: { + control: "select", + options: bosonButtonThemeKeys } }, decorators: [ @@ -282,7 +307,9 @@ export const BosonTheme = { walletColor: colors.white, walletHoverFocusBackgroundColor: colors.black, walletHoverColor: colors.white, - magicLoginButtonThemeKey: undefined + magicLoginButtonThemeKey: undefined, + connectionErrorTryAgainButtonThemeKey: "orangeInverse", + connectionErrorBackToWalletSelectionButtonThemeKey: "orangeInverse" } }; @@ -307,6 +334,8 @@ export const CustomTheme = { walletHoverFocusBackgroundColor: "#e89f0e", walletHoverColor: "#ff0000", magicLoginButtonThemeKey: "orangeInverse", + connectionErrorTryAgainButtonThemeKey: "orangeInverse", + connectionErrorBackToWalletSelectionButtonThemeKey: "orangeInverse", magicLoginButtonBorderRadiusPx: "50", withMagicLogin: true, showStatusIcon: false, From a7e2ce6fdb531dd8cf12993146e8f195d3a52cf3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 7 Oct 2024 15:19:53 +0000 Subject: [PATCH 16/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index cf8b3dc17..4df2abc93 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.6", + "version": "1.7.10-alpha.7", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.1", + "@bosonprotocol/common": "^1.29.0-alpha.2", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index 016a44c3c..60cacd4c1 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.6", + "version": "1.0.5-alpha.7", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.1", + "@bosonprotocol/common": "^1.29.0-alpha.2", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index f79d44c49..9a4c104f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.6", + "version": "1.7.10-alpha.7", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.1", + "@bosonprotocol/common": "^1.29.0-alpha.2", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.6", + "version": "1.0.5-alpha.7", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.1", + "@bosonprotocol/common": "^1.29.0-alpha.2", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42883,7 +42883,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.1", + "version": "1.29.0-alpha.2", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42904,10 +42904,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.15", + "version": "1.41.0-alpha.16", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.1", + "@bosonprotocol/common": "^1.29.0-alpha.2", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42968,10 +42968,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.1", + "version": "1.7.0-alpha.2", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.1" + "@bosonprotocol/common": "^1.29.0-alpha.2" }, "devDependencies": { "eslint": "^8.10.0", @@ -42987,10 +42987,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.1", + "version": "1.15.0-alpha.2", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.1" + "@bosonprotocol/common": "^1.29.0-alpha.2" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43007,7 +43007,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.13", + "version": "1.12.0-alpha.14", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43048,13 +43048,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.13", + "version": "0.34.0-alpha.14", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.15", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.1", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.13", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.16", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.2", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.14", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43846,7 +43846,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.15", + "version": "1.34.0-alpha.16", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index 1d0da990d..512ad2e4d 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.1", + "version": "1.29.0-alpha.2", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 185758ea9..f6fa5414b 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.15", + "version": "1.41.0-alpha.16", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.1", + "@bosonprotocol/common": "^1.29.0-alpha.2", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index ebae71067..68db731d7 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.1", + "version": "1.7.0-alpha.2", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.1" + "@bosonprotocol/common": "^1.29.0-alpha.2" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index 9d2759f02..7c5bc52a4 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.1", + "version": "1.15.0-alpha.2", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.1" + "@bosonprotocol/common": "^1.29.0-alpha.2" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index c25e2c167..41c5fdf69 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.13", + "version": "1.12.0-alpha.14", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 560ef29d2..9c218d946 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.13", + "version": "0.34.0-alpha.14", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.15", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.1", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.13", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.16", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.2", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.14", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 3889f5cfa..bfbfdf007 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.15", + "version": "1.34.0-alpha.16", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From b90d7d35c0f6f17e6ea841552eea32d773626790 Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Wed, 9 Oct 2024 16:35:17 +0100 Subject: [PATCH 17/65] chore: upgrade opensea-js dep and change OrderSide enum type (#805) * chore: upgrade opensea-js dep and change OrderSide enum type * force rebuild opensea-api-mock container * chore: add unit test for opensea marketplace * pr remarks --- e2e/docker-compose.yml | 2 +- e2e/opensea-api-mock/package.json | 2 +- e2e/opensea-api-mock/src/services/opensea.ts | 14 +- package-lock.json | 13 +- package.json | 2 +- packages/core-sdk/package.json | 2 +- packages/core-sdk/src/marketplaces/opensea.ts | 24 +- packages/core-sdk/src/marketplaces/types.ts | 5 +- .../tests/marketplaces/opensea.test.ts | 219 ++++++++++++++++++ 9 files changed, 250 insertions(+), 33 deletions(-) create mode 100644 packages/core-sdk/tests/marketplaces/opensea.test.ts diff --git a/e2e/docker-compose.yml b/e2e/docker-compose.yml index 3dc91c81b..70f60e0c5 100644 --- a/e2e/docker-compose.yml +++ b/e2e/docker-compose.yml @@ -23,7 +23,7 @@ services: context: ../. dockerfile: ./e2e/opensea-api-mock/Dockerfile user: "node:node" - image: opensea-api-mock:202518061227 + image: opensea-api-mock:202410071017 ports: - "3334:3334" environment: diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index 60cacd4c1..3943abb35 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -32,7 +32,7 @@ "express": "^4.18.1", "express-validator": "^6.14.2", "morgan": "^1.10.0", - "opensea-js": "^7.1.3", + "opensea-js": "^7.1.13", "ts-command-line-args": "^2.3.1", "winston": "^3.8.2" }, diff --git a/e2e/opensea-api-mock/src/services/opensea.ts b/e2e/opensea-api-mock/src/services/opensea.ts index 429a0110f..8466e5a90 100644 --- a/e2e/opensea-api-mock/src/services/opensea.ts +++ b/e2e/opensea-api-mock/src/services/opensea.ts @@ -120,10 +120,10 @@ export async function computeFulfillmentData( function getOrderSide(sidePath: string): OrderSide { switch (sidePath) { case "listings": { - return OrderSide.ASK; + return OrderSide.LISTING; } case "offers": { - return OrderSide.BID; + return OrderSide.OFFER; } default: throw new Error(`Invalid sidePath '${sidePath}'`); @@ -151,17 +151,17 @@ function extractOrderInfo( (c) => c.itemType === ItemType.ERC721 ); const nftAsk = parameters.offer.find((c) => c.itemType === ItemType.ERC721); - if (side === OrderSide.BID && !nftBid) { + if (side === OrderSide.OFFER && !nftBid) { throw new Error(`NFT not found in order consideration`); } - if (side === OrderSide.ASK && !nftAsk) { + if (side === OrderSide.LISTING && !nftAsk) { throw new Error(`NFT not found in order offer`); } if (!side) { if (nftBid && !nftAsk) { - side = OrderSide.BID; + side = OrderSide.OFFER; } else if (!nftBid && nftAsk) { - side = OrderSide.ASK; + side = OrderSide.LISTING; } else if (nftBid && nftAsk) { throw new Error( `NFT found in both consideration and offer. Unable to detect the order side` @@ -172,7 +172,7 @@ function extractOrderInfo( ); } } - if (side === OrderSide.BID) { + if (side === OrderSide.OFFER) { price = parameters.offer .filter((c) => c.itemType === ItemType.ERC20) .reduce( diff --git a/package-lock.json b/package-lock.json index 9a4c104f1..82974b4e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "graphql": "^16.8.1", "ipfs-utils": "^9.0.14", "lerna": "^5.5.1", - "opensea-js": "^7.1.5", + "opensea-js": "^7.1.13", "prettier": "^3.2.5", "run-script-os": "^1.1.6", "ts-jest": "29.1.1", @@ -155,7 +155,7 @@ "express": "^4.18.1", "express-validator": "^6.14.2", "morgan": "^1.10.0", - "opensea-js": "^7.1.3", + "opensea-js": "^7.1.13", "ts-command-line-args": "^2.3.1", "winston": "^3.8.2" }, @@ -31459,10 +31459,11 @@ "link": true }, "node_modules/opensea-js": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/opensea-js/-/opensea-js-7.1.5.tgz", - "integrity": "sha512-nR5AAqT+sK2CiG9iuvqbVuUlbrs4wMRG32514wtRL/mFlSUr9hkteIitG23R4zGrjjyTJbI6wIaEclnccbI76Q==", + "version": "7.1.13", + "resolved": "https://registry.npmjs.org/opensea-js/-/opensea-js-7.1.13.tgz", + "integrity": "sha512-IwyBeGU/W6dBG3HCopzq1UdTXkxuIK9aWqucXFy6VUUxZQBKFbssX0OgkHl9RO6udHLC9Y9GG3HqSYDBfEiD7A==", "hasInstallScript": true, + "license": "MIT", "dependencies": { "@opensea/seaport-js": "^4.0.0", "ethers": "^6.9.0" @@ -42918,7 +42919,7 @@ "graphql": "^16.5.0", "graphql-request": "^4.3.0", "mustache": "^4.2.0", - "opensea-js": "^7.1.5", + "opensea-js": "^7.1.13", "schema-to-yup": "^1.11.11", "yup": "^0.32.11" }, diff --git a/package.json b/package.json index d1f636684..c6bd41912 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "graphql": "^16.8.1", "ipfs-utils": "^9.0.14", "lerna": "^5.5.1", - "opensea-js": "^7.1.5", + "opensea-js": "^7.1.13", "prettier": "^3.2.5", "run-script-os": "^1.1.6", "ts-jest": "29.1.1", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index f6fa5414b..5edb6d2a8 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -46,7 +46,7 @@ "graphql": "^16.5.0", "graphql-request": "^4.3.0", "mustache": "^4.2.0", - "opensea-js": "^7.1.5", + "opensea-js": "^7.1.13", "schema-to-yup": "^1.11.11", "yup": "^0.32.11" }, diff --git a/packages/core-sdk/src/marketplaces/opensea.ts b/packages/core-sdk/src/marketplaces/opensea.ts index cd2d32a39..3814f70a4 100644 --- a/packages/core-sdk/src/marketplaces/opensea.ts +++ b/packages/core-sdk/src/marketplaces/opensea.ts @@ -264,7 +264,7 @@ export class OpenSeaMarketplace extends Marketplace { const osOrder = await this._handler.api.postOrder(order, { protocol: "seaport", protocolAddress, - side: OrderSide.BID + side: OrderSide.OFFER }); return this.convertOsOrder(osOrder); } @@ -281,7 +281,7 @@ export class OpenSeaMarketplace extends Marketplace { const osOrder = await this._handler.api.getOrder({ assetContractAddress: asset.contract, tokenId: asset.tokenId, - side: OrderSide.BID, + side: OrderSide.OFFER, ...filter }); const fulfillerAddress = asset.withWrapper @@ -316,7 +316,7 @@ export class OpenSeaMarketplace extends Marketplace { const osOrder = await this._handler.api.getOrder({ assetContractAddress: withWrapper ? wrapper.address : asset.contract, tokenId: asset.tokenId, - side: OrderSide.BID + side: OrderSide.OFFER }); const ffd = await this._handler.api.generateFulfillmentData( withWrapper @@ -449,7 +449,7 @@ export class OpenSeaMarketplace extends Marketplace { const osOrder = await this._handler.api.getOrder({ assetContractAddress: wrapper.address, // Bid Order must be for the wrapped token tokenId: asset.tokenId, - side: OrderSide.BID + side: OrderSide.OFFER }); const ffd = await this._handler.api.generateFulfillmentData( this._contracts.priceDiscoveryClient, // the address of the PriceDiscoveryClient contract, which will call the fulfilment method @@ -484,7 +484,7 @@ export class OpenSeaMarketplace extends Marketplace { return undefined; } const orderInfo = this.extractOrderInfo(osOrder.protocolData.parameters); - const side = orderInfo.side === OrderSide.ASK ? Side.Ask : Side.Bid; + const side = orderInfo.side === OrderSide.LISTING ? Side.Ask : Side.Bid; return { offerer: orderInfo.offerer, side, @@ -524,17 +524,17 @@ export class OpenSeaMarketplace extends Marketplace { (c) => c.itemType === ItemType.ERC721 ); const nftAsk = parameters.offer.find((c) => c.itemType === ItemType.ERC721); - if (side === OrderSide.BID && !nftBid) { + if (side === OrderSide.OFFER && !nftBid) { console.warn(`NFT not found in order consideration`); } - if (side === OrderSide.ASK && !nftAsk) { + if (side === OrderSide.LISTING && !nftAsk) { console.warn(`NFT not found in order offer`); } if (!side) { if (nftBid && !nftAsk) { - side = OrderSide.BID; + side = OrderSide.OFFER; } else if (!nftBid && nftAsk) { - side = OrderSide.ASK; + side = OrderSide.LISTING; } else if (nftBid && nftAsk) { console.warn( `NFT found in both consideration and offer. Unable to detect the order side` @@ -545,7 +545,7 @@ export class OpenSeaMarketplace extends Marketplace { ); } } - if (side === OrderSide.BID) { + if (side === OrderSide.OFFER) { price = parameters.offer .filter((c) => c.itemType === ItemType.ERC20) .reduce( @@ -600,7 +600,7 @@ export class OpenSeaMarketplace extends Marketplace { const osOrder = await this._handler.api.getOrder({ assetContractAddress: asset.contract, tokenId: asset.tokenId, - side: side === Side.Ask ? OrderSide.ASK : OrderSide.BID, + side: side === Side.Ask ? OrderSide.LISTING : OrderSide.OFFER, ...filter }); return osOrder @@ -622,7 +622,7 @@ export class OpenSeaMarketplace extends Marketplace { const { orders } = await this._handler.api.getOrders({ assetContractAddress: asset.contract, tokenIds: asset.tokenIds, - side: side === Side.Ask ? OrderSide.ASK : OrderSide.BID, + side: side === Side.Ask ? OrderSide.LISTING : OrderSide.OFFER, ...filter }); return orders.map((osOrder) => ({ diff --git a/packages/core-sdk/src/marketplaces/types.ts b/packages/core-sdk/src/marketplaces/types.ts index f324079a8..7fa87fc30 100644 --- a/packages/core-sdk/src/marketplaces/types.ts +++ b/packages/core-sdk/src/marketplaces/types.ts @@ -16,10 +16,7 @@ export enum MarketplaceType { OPENSEA } -export enum OrderSide { - ASK = "ask", - BID = "bid" -} +export { OrderSide } from "opensea-js"; export type MarketplaceHandler = OpenSeaSDKHandler | DefaultHandler; diff --git a/packages/core-sdk/tests/marketplaces/opensea.test.ts b/packages/core-sdk/tests/marketplaces/opensea.test.ts new file mode 100644 index 000000000..c83ef2658 --- /dev/null +++ b/packages/core-sdk/tests/marketplaces/opensea.test.ts @@ -0,0 +1,219 @@ +import { MockWeb3LibAdapter } from "@bosonprotocol/common/tests/mocks"; +import { OpenSeaMarketplace } from "../../src/marketplaces/opensea"; +import { MarketplaceType } from "../../src/marketplaces"; +import { + FulfillmentDataResponse, + GetNFTResponse, + NFT, + OrderV2 +} from "opensea-js"; +import { + AdvancedOrder, + CreateInputItem, + CreateOrderAction, + OrderUseCase +} from "@opensea/seaport-js/lib/types"; +import { ContractAddresses, Side } from "@bosonprotocol/common"; +import { ItemType } from "@opensea/seaport-js/lib/constants"; + +let openSeaSdkHandlerReturn: Record; +const mockOpenSeaSdkHandler = { + api: { + apiBaseUrl: "apiBaseUrl", + getOrder: async (): Promise => { + return openSeaSdkHandlerReturn.getOrder as OrderV2; + }, + getOrders: async (): Promise<{ orders: OrderV2[] }> => { + return openSeaSdkHandlerReturn.getOrders as { orders: OrderV2[] }; + }, + generateFulfillmentData: async (): Promise => { + return openSeaSdkHandlerReturn.generateFulfillmentData as FulfillmentDataResponse; + }, + getNFT: async (): Promise => { + return openSeaSdkHandlerReturn.getNFT as GetNFTResponse; + }, + postOrder: async (): Promise => { + return openSeaSdkHandlerReturn.postOrder as OrderV2; + } + }, + seaport_v1_6: { + createOrder: async (): Promise> => { + return openSeaSdkHandlerReturn.createOrder as OrderUseCase; + } + }, + createListing: async (): Promise => { + return openSeaSdkHandlerReturn.createListing as OrderV2; + }, + getNFTItems: (): CreateInputItem[] => { + return openSeaSdkHandlerReturn.getNFTItems as CreateInputItem[]; + } +}; + +describe("", () => { + let openseaSdkMarketplace: OpenSeaMarketplace; + const asset = { + contract: "contract", + tokenId: "123" + }; + beforeAll(async () => { + const web3lib = new MockWeb3LibAdapter(); + openseaSdkMarketplace = new OpenSeaMarketplace( + MarketplaceType.OPENSEA, + mockOpenSeaSdkHandler, + {} as unknown as ContractAddresses, + "", + web3lib + ); + }); + test("createBidOrder() fails when the protocolAddress is not found", async () => { + openSeaSdkHandlerReturn = { + getNFT: { + nft: {} as NFT + }, + getNFTItems: [ + { itemType: ItemType.ERC721, token: "token", identifier: "123" } + ], + createOrder: { + // eslint-disable-next-line @typescript-eslint/no-empty-function + executeAllActions: () => {} + } + }; + await expect( + openseaSdkMarketplace.createBidOrder({ + asset, + offerer: "offerer", + price: "100000", + expirationTime: 0, + exchangeToken: { address: "address", decimals: 18 }, + auction: true + }) + ).rejects.toThrow( + `Seaport protocol address must be specified in Listing or CoreSDK config` + ); + }); + test("buildAdvancedOrder()", async () => { + const order = { + createdDate: Date.now().toString() + } as OrderV2; + const expectedAdvancedOrder = { + signature: "signature" + } as AdvancedOrder; + openSeaSdkHandlerReturn = { + getOrder: order, + generateFulfillmentData: { + fulfillment_data: { + transaction: { + input_data: { + orders: [expectedAdvancedOrder] + } + } + } + } + }; + const advancedOrder = await openseaSdkMarketplace.buildAdvancedOrder(asset); + expect(advancedOrder.signature).toEqual(expectedAdvancedOrder.signature); + }); + test("getOrder()", async () => { + openSeaSdkHandlerReturn = { + getOrder: null + }; + const signedOrder = await openseaSdkMarketplace.getOrder(asset, Side.Ask); + expect(signedOrder).not.toBeTruthy(); + }); + test("getOrders()", async () => { + const order = { + createdDate: Date.now().toString(), + protocolData: { + parameters: { + consideration: [ + { + itemType: ItemType.ERC721 + } + ], + offer: [ + { + itemType: ItemType.ERC20, + startAmount: "1" + } + ] + }, + signature: "signature" + } + } as OrderV2; + openSeaSdkHandlerReturn = { + getOrders: { orders: [order] } + }; + const signedOrders = await openseaSdkMarketplace.getOrders( + { + contract: asset.contract, + tokenIds: [asset.tokenId] + }, + Side.Ask + ); + expect(signedOrders.length).toEqual(1); + }); + test("getOrders() failed #1", async () => { + const order = { + createdDate: Date.now().toString(), + protocolData: { + parameters: { + consideration: [ + { + itemType: ItemType.ERC721 + } + ], + offer: [ + { + itemType: ItemType.ERC721 + } + ] + }, + signature: "signature" + } + } as OrderV2; + openSeaSdkHandlerReturn = { + getOrders: { orders: [order] } + }; + const signedOrders = await openseaSdkMarketplace.getOrders( + { + contract: asset.contract, + tokenIds: [asset.tokenId] + }, + Side.Ask + ); + expect(signedOrders.length).toEqual(1); + }); + test("getOrders() failed #2", async () => { + const order = { + createdDate: Date.now().toString(), + protocolData: { + parameters: { + consideration: [ + { + itemType: ItemType.ERC20, + startAmount: "1" + } + ], + offer: [ + { + itemType: ItemType.ERC20, + startAmount: "2" + } + ] + }, + signature: "signature" + } + } as OrderV2; + openSeaSdkHandlerReturn = { + getOrders: { orders: [order] } + }; + const signedOrders = await openseaSdkMarketplace.getOrders( + { + contract: asset.contract, + tokenIds: [asset.tokenId] + }, + Side.Ask + ); + expect(signedOrders.length).toEqual(1); + }); +}); From ab3c9638ee0946ccfa74663c70bddcb21865d51a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 9 Oct 2024 15:39:45 +0000 Subject: [PATCH 18/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index 4df2abc93..cab324b61 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.7", + "version": "1.7.10-alpha.8", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.2", + "@bosonprotocol/common": "^1.29.0-alpha.3", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index 3943abb35..a919e7233 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.7", + "version": "1.0.5-alpha.8", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.2", + "@bosonprotocol/common": "^1.29.0-alpha.3", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index 82974b4e9..46768764a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.7", + "version": "1.7.10-alpha.8", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.2", + "@bosonprotocol/common": "^1.29.0-alpha.3", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.7", + "version": "1.0.5-alpha.8", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.2", + "@bosonprotocol/common": "^1.29.0-alpha.3", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42884,7 +42884,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.2", + "version": "1.29.0-alpha.3", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42905,10 +42905,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.16", + "version": "1.41.0-alpha.17", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.2", + "@bosonprotocol/common": "^1.29.0-alpha.3", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42969,10 +42969,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.2", + "version": "1.7.0-alpha.3", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.2" + "@bosonprotocol/common": "^1.29.0-alpha.3" }, "devDependencies": { "eslint": "^8.10.0", @@ -42988,10 +42988,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.2", + "version": "1.15.0-alpha.3", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.2" + "@bosonprotocol/common": "^1.29.0-alpha.3" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43008,7 +43008,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.14", + "version": "1.12.0-alpha.15", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43049,13 +43049,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.14", + "version": "0.34.0-alpha.15", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.16", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.2", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.14", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.17", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.3", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.15", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43847,7 +43847,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.16", + "version": "1.34.0-alpha.17", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index 512ad2e4d..7e0595ef9 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.2", + "version": "1.29.0-alpha.3", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 5edb6d2a8..50b242b73 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.16", + "version": "1.41.0-alpha.17", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.2", + "@bosonprotocol/common": "^1.29.0-alpha.3", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index 68db731d7..b8adb90a3 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.2", + "version": "1.7.0-alpha.3", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.2" + "@bosonprotocol/common": "^1.29.0-alpha.3" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index 7c5bc52a4..07a7caa2c 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.2", + "version": "1.15.0-alpha.3", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.2" + "@bosonprotocol/common": "^1.29.0-alpha.3" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index 41c5fdf69..93bb0e85f 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.14", + "version": "1.12.0-alpha.15", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 9c218d946..98e9f8603 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.14", + "version": "0.34.0-alpha.15", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.16", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.2", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.14", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.17", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.3", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.15", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index bfbfdf007..21c3b2653 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.16", + "version": "1.34.0-alpha.17", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From 1cf62d4b6426e43a5da4bffc76794b4eb5e45fe5 Mon Sep 17 00:00:00 2001 From: max-koz <109581727+max-koz@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:06:55 +0200 Subject: [PATCH 19/65] feat: product card update (#808) * feat: product card update * Update ProductCard.tsx * CR Fixes * Update ProductCardSkeleton.tsx * fix: cr fixes * feat: add props for cover image * Update ProductCard.styles.ts --------- Co-authored-by: Maksymilian Kozak --- .../currencyDisplay/CurrencyDisplay.tsx | 37 +++--- .../src/components/image/Image.styles.ts | 2 - .../productCard/ProductCard.styles.ts | 80 +++++++++---- .../components/productCard/ProductCard.tsx | 108 +++++++++--------- .../skeleton/ProductCardSkeleton.tsx | 5 +- .../src/stories/ProductCard.stories.tsx | 8 +- 6 files changed, 131 insertions(+), 109 deletions(-) diff --git a/packages/react-kit/src/components/currencyDisplay/CurrencyDisplay.tsx b/packages/react-kit/src/components/currencyDisplay/CurrencyDisplay.tsx index 49e837a25..d53194074 100644 --- a/packages/react-kit/src/components/currencyDisplay/CurrencyDisplay.tsx +++ b/packages/react-kit/src/components/currencyDisplay/CurrencyDisplay.tsx @@ -1,5 +1,5 @@ import React from "react"; -import styled, { css } from "styled-components"; +import styled, { css, CSSProperties } from "styled-components"; import { Bitcoin, @@ -24,10 +24,14 @@ export enum Currencies { USDC = "USDC", WETH = "WETH" } + interface CurrencyDisplayProps { value?: number | string; currency: Currencies; height?: number; + fontSize?: number | string; + iconSize?: number; + gap?: number | string; // eslint-disable-next-line @typescript-eslint/no-explicit-any [x: string]: any; } @@ -36,6 +40,9 @@ export const CurrencyDisplay = ({ value, currency, height = 25, + fontSize, + iconSize, + gap, ...rest }: CurrencyDisplayProps) => { return ( @@ -43,9 +50,11 @@ export const CurrencyDisplay = ({ style={{ height: `${height}px`, width: "100%" }} {...rest} > - + {value && ( - {value} + + {value} + )} ); @@ -57,17 +66,20 @@ const CurrencyDisplayValueWrapper = styled.div` align-items: center; `; -const CurrencyDisplayValue = styled.span<{ $height: number }>` - ${({ $height }) => css` +const CurrencyDisplayValue = styled.span<{ + $height: CSSProperties["height"]; + $fontSize?: CSSProperties["fontSize"]; + $gap?: CSSProperties["gap"]; +}>` + ${({ $height, $fontSize, $gap }) => css` line-height: ${$height}px; - font-size: ${($height - 5) / 16}rem; + font-size: ${$fontSize ? $fontSize : `${(Number($height) - 5) / 16}rem`}; + padding-left: ${$gap !== undefined ? $gap : "1rem"}; `} - color: #09182c; display: flex; text-align: right; align-items: center; - padding-left: 1rem; `; export const CurrencyLogo = ({ @@ -80,31 +92,22 @@ export const CurrencyLogo = ({ switch (currency) { case Currencies.ETH: return ; - case Currencies.BTC: return ; - case Currencies.POLYGON: return ; - case Currencies.SOLANA: return ; - case Currencies.TETHER: return ; - case Currencies.DAI: return ; - case Currencies.WETH: return ; - case Currencies.BOSON: return ; - case Currencies.USDC: return ; - default: return
{currency}
; } diff --git a/packages/react-kit/src/components/image/Image.styles.ts b/packages/react-kit/src/components/image/Image.styles.ts index ec92e7d16..28067031b 100644 --- a/packages/react-kit/src/components/image/Image.styles.ts +++ b/packages/react-kit/src/components/image/Image.styles.ts @@ -15,8 +15,6 @@ export const ImageContainer = styled.img` width: 100%; height: 100%; object-fit: contain; - object-position: top; - padding: 1rem; `; const buttonText = css` diff --git a/packages/react-kit/src/components/productCard/ProductCard.styles.ts b/packages/react-kit/src/components/productCard/ProductCard.styles.ts index 1671c80d1..94b1550eb 100644 --- a/packages/react-kit/src/components/productCard/ProductCard.styles.ts +++ b/packages/react-kit/src/components/productCard/ProductCard.styles.ts @@ -1,13 +1,14 @@ import styled, { css } from "styled-components"; import { theme } from "../../theme"; import { cardWrapperStyles } from "./commonStyles"; +import { Typography } from "../ui/Typography"; +import { zIndex } from "../ui/zIndex"; export const ProductCardLabelWrapper = styled.div` position: absolute; top: 0.5rem; left: 0.5rem; background: white; - padding: 0.25rem 0.5rem 0.25rem 0.5rem; font-weight: 600; color: ${({ theme }) => theme?.colors?.light.darkGrey}; z-index: 1; @@ -73,20 +74,24 @@ export const ProductCardCreatorAvatar = styled.div` export const ProductCardCreatorName = styled.div` font-weight: 600; - font-size: 0.75rem; + font-size: 0.625rem; line-height: 150%; - min-height: 3em; - color: ${({ theme }) => theme?.colors?.light.accent}; + color: ${({ theme }) => theme?.colors?.light.darkGrey}; flex: none; order: 1; flex-grow: 0; - justify-self: flex-end; - margin-bottom: 0.25rem; + justify-self: flex-start; + margin-right: auto; + > span { + font-weight: 600; + font-size: 0.625rem; + color: ${({ theme }) => theme?.colors?.light.darkGrey}; + } `; -export const ProductCardTitle = styled.div.attrs({ className: "title" })` - font-weight: 600; - font-size: 1.25rem; +export const ProductCardTitle = styled(Typography).attrs({ + className: "title" +})` color: ${({ theme }) => theme?.colors?.light.black}; word-break: break-word; overflow: hidden; @@ -117,37 +122,34 @@ export const ProductCardPrice = styled.div` color: ${({ theme }) => theme?.colors?.light.darkGrey}; `; -export const ProductCardData = styled.div` - display: flex; - flex-direction: column; -`; - export const ProductCardBottom = styled.div.attrs({ className: "bottom" })` width: 100%; - background: ${theme?.colors?.light.white}; height: 12rem; display: flex; flex-direction: column; - justify-content: space-between; + justify-content: flex-end; + z-index: ${zIndex.ChatSeparator}; + flex: 0; `; export const ProductCardBottomContent = styled.div` display: flex; justify-content: space-between; + flex-direction: column; width: 100%; - padding: 1rem 1.5rem 0.5rem 1.5rem; box-sizing: border-box; align-items: flex-start; column-gap: 0.25rem; - border-top: 2px solid ${theme.colors.light.border}; `; export const ProductCardTitleWrapper = styled.div` width: 100%; - padding: 0 1.5rem 0.5rem 1.5rem; box-sizing: border-box; `; -export const ProductCardWrapper = styled.div<{ $isHoverDisabled: boolean }>` +export const ProductCardWrapper = styled.div<{ + $isHoverDisabled: boolean; + $isImageFitCover?: boolean; +}>` ${cardWrapperStyles} overflow: hidden; position: relative; @@ -156,6 +158,9 @@ export const ProductCardWrapper = styled.div<{ $isHoverDisabled: boolean }>` justify-content: space-between; flex-direction: column; cursor: pointer; + min-height: 286px; + height: 286px; + padding: 0 1rem 1rem 1rem; [data-image-wrapper] { position: static; padding-top: 0; @@ -163,6 +168,15 @@ export const ProductCardWrapper = styled.div<{ $isHoverDisabled: boolean }>` display: flex; justify-content: center; align-items: center; + ${({ $isImageFitCover }) => + $isImageFitCover + ? css` + width: 100%; + img { + object-fit: cover; + } + ` + : ""} } ${({ $isHoverDisabled }) => !$isHoverDisabled @@ -176,8 +190,10 @@ export const ProductCardWrapper = styled.div<{ $isHoverDisabled: boolean }>` 16px 16px 16px rgba(0, 0, 0, 0.05); [data-image-wrapper] { + width: 110%; img { - transform: scale(1.05); + transform: scale(1.5); + object-position: center; transition: all 300ms ease-in-out; } } @@ -192,7 +208,7 @@ export const ProductCardTop = styled.div<{ $isNotImageLoaded: boolean }>` overflow: hidden; width: 100%; align-self: stretch; - z-index: 0; + z-index: ${zIndex.Default}; `; export const BottomText = styled.p` @@ -200,14 +216,28 @@ export const BottomText = styled.p` font-weight: 600; line-height: 0.975rem; margin: 0; - padding: 0 1.5rem 1rem 1.5rem; letter-spacing: 0.5px; color: ${theme.colors.light.darkGrey}; `; export const ProductCardImageWrapper = styled.div` width: 100%; - min-height: 0; - height: auto; + height: 13.125rem; + display: flex; + justify-content: center; + align-items: center; + padding-top: 0.9375rem; + padding-bottom: 0.9375rem; flex: 1; `; + +export const ProductCardImageAndCTAContainer = styled.div` + position: relative; +`; + +export const CTAOnHoverContainer = styled.div<{ $isHovered: boolean }>` + position: absolute; + z-index: ${zIndex.OfferCard}; + bottom: ${({ $isHovered }) => ($isHovered ? "95px" : "1.875rem")}; + transition: all 300ms ease-in-out; +`; diff --git a/packages/react-kit/src/components/productCard/ProductCard.tsx b/packages/react-kit/src/components/productCard/ProductCard.tsx index f9a54f741..10a2f5af6 100644 --- a/packages/react-kit/src/components/productCard/ProductCard.tsx +++ b/packages/react-kit/src/components/productCard/ProductCard.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { ReactNode, useState } from "react"; import { Currencies, CurrencyDisplay @@ -6,23 +6,20 @@ import { import { IBaseImage, Image } from "../image/Image"; import { Tooltip, TooltipProps } from "../tooltip/Tooltip"; import { - BottomText, ProductCardBottom, ProductCardBottomContent, - ProductCardCreator, - ProductCardCreatorAvatar, TopLeftRibbon, ProductCardCreatorName, - ProductCardData, ProductCardImageWrapper, - ProductCardPrice, - ProductCardPriceWrapper, ProductCardTitle, ProductCardTitleWrapper, - ProductCardWrapper + ProductCardWrapper, + CTAOnHoverContainer } from "./ProductCard.styles"; import { ProductType } from "./const"; +import { Grid } from "../ui/Grid"; + interface IProductCard { asterisk?: boolean; avatar: string; @@ -42,6 +39,9 @@ interface IProductCard { title: string; tooltip?: string; tooltipProps?: Omit; + CTAOnHover?: ReactNode; + hideCreatorName?: boolean; + isImageFitCover?: boolean; } const Wrapper = ({ @@ -62,85 +62,83 @@ const Wrapper = ({ } return <>{children}; }; + export const PhygitalLabel = ({ ...rest }) => { return ; }; + export const ProductCard = (props: IProductCard) => { const { - asterisk = false, - avatar, - onAvatarError, avatarName, - bottomText, currency, dataCard = "product-card", dataTestId = "offer", imageProps, isHoverDisabled = false, - onAvatarNameClick, onCardClick, price, productId, title, tooltip = "", tooltipProps = {}, - productType + CTAOnHover, + hideCreatorName = false, + isImageFitCover = false } = props; - const isPhygital = productType === ProductType.phygital; + + const [isHovered, setIsHovered] = useState(false); + return ( { e.preventDefault(); onCardClick?.(productId); }} + onMouseEnter={() => setIsHovered(true)} + onMouseLeave={() => setIsHovered(false)} > - {isPhygital && } + {CTAOnHover && ( + + {CTAOnHover} + + )} -
- - - { - e.stopPropagation(); - onAvatarNameClick?.(); - }} - > - - avatar - - - {avatarName} - - - - - - <> - Price {asterisk && "*"} - - - - - - - {title} - -
- {bottomText && {bottomText}} + + + + + {title} + + + {!hideCreatorName && ( + + {avatarName} + + )} + + + + +
); diff --git a/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx b/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx index 90a007a0e..460570026 100644 --- a/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx +++ b/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx @@ -6,7 +6,6 @@ import { ProductCardCreator, ProductCardCreatorAvatar, ProductCardCreatorName, - ProductCardData, ProductCardImageWrapper, ProductCardPrice, ProductCardPriceWrapper, @@ -37,7 +36,7 @@ export const ProductCardSkeleton = (props: SkeletonCardProps) => {
- + @@ -46,7 +45,7 @@ export const ProductCardSkeleton = (props: SkeletonCardProps) => { - + diff --git a/packages/react-kit/src/stories/ProductCard.stories.tsx b/packages/react-kit/src/stories/ProductCard.stories.tsx index e7ca11a04..d17fe8291 100644 --- a/packages/react-kit/src/stories/ProductCard.stories.tsx +++ b/packages/react-kit/src/stories/ProductCard.stories.tsx @@ -39,13 +39,7 @@ ProductCardPrimary.args = { "https://images.unsplash.com/flagged/photo-1570612861542-284f4c12e75f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80", avatarName: ( <> - - JSON Doe - + JSON Doe ), asterisk: true, From e4cde682bc9094455599408bd87ada6a3b348672 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 11 Oct 2024 14:10:28 +0000 Subject: [PATCH 20/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index cab324b61..d46282907 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.8", + "version": "1.7.10-alpha.9", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.3", + "@bosonprotocol/common": "^1.29.0-alpha.4", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index a919e7233..bc39991ae 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.8", + "version": "1.0.5-alpha.9", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.3", + "@bosonprotocol/common": "^1.29.0-alpha.4", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index 46768764a..19ab584b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.8", + "version": "1.7.10-alpha.9", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.3", + "@bosonprotocol/common": "^1.29.0-alpha.4", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.8", + "version": "1.0.5-alpha.9", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.3", + "@bosonprotocol/common": "^1.29.0-alpha.4", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42884,7 +42884,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.3", + "version": "1.29.0-alpha.4", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42905,10 +42905,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.17", + "version": "1.41.0-alpha.18", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.3", + "@bosonprotocol/common": "^1.29.0-alpha.4", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42969,10 +42969,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.3", + "version": "1.7.0-alpha.4", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.3" + "@bosonprotocol/common": "^1.29.0-alpha.4" }, "devDependencies": { "eslint": "^8.10.0", @@ -42988,10 +42988,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.3", + "version": "1.15.0-alpha.4", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.3" + "@bosonprotocol/common": "^1.29.0-alpha.4" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43008,7 +43008,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.15", + "version": "1.12.0-alpha.16", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43049,13 +43049,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.15", + "version": "0.34.0-alpha.16", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.17", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.3", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.15", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.18", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.4", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.16", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43847,7 +43847,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.17", + "version": "1.34.0-alpha.18", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index 7e0595ef9..6086b62be 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.3", + "version": "1.29.0-alpha.4", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 50b242b73..46134674e 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.17", + "version": "1.41.0-alpha.18", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.3", + "@bosonprotocol/common": "^1.29.0-alpha.4", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index b8adb90a3..de6447c5d 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.3", + "version": "1.7.0-alpha.4", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.3" + "@bosonprotocol/common": "^1.29.0-alpha.4" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index 07a7caa2c..9887ad5f6 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.3", + "version": "1.15.0-alpha.4", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.3" + "@bosonprotocol/common": "^1.29.0-alpha.4" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index 93bb0e85f..2f56b5fe2 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.15", + "version": "1.12.0-alpha.16", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 98e9f8603..2e40ac959 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.15", + "version": "0.34.0-alpha.16", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.17", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.3", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.15", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.18", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.4", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.16", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 21c3b2653..bd78237f5 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.17", + "version": "1.34.0-alpha.18", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From bc214c0f5f4de7e53e66e4e59aacc206d152529d Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:13:14 +0200 Subject: [PATCH 21/65] fix: subgraphUrl for amoy env (#810) --- packages/common/src/configs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/src/configs.ts b/packages/common/src/configs.ts index d324d8b3d..ca6a0e722 100644 --- a/packages/common/src/configs.ts +++ b/packages/common/src/configs.ts @@ -54,7 +54,7 @@ export const envConfigs: Record = { nativeCoin: chainIdToInfo.get(80002), getTxExplorerUrl: chainIdToGraphTx.get(80002), subgraphUrl: - "https://api.studio.thegraph.com/query/19713/boson-testing-amoy/v0.0.1", + "https://api.studio.thegraph.com/query/19713/boson-testing-amoy/version/latest", jsonRpcUrl: "https://polygon-amoy.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0", From 6999b44956f0d4594fc2eeb6fbfdcddf20749825 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 14 Oct 2024 09:17:17 +0000 Subject: [PATCH 22/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index d46282907..5871e5dfd 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.9", + "version": "1.7.10-alpha.10", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.5", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index bc39991ae..0dba0f796 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.9", + "version": "1.0.5-alpha.10", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.5", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index 19ab584b9..385daa314 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.9", + "version": "1.7.10-alpha.10", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.5", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.9", + "version": "1.0.5-alpha.10", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.5", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42884,7 +42884,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.4", + "version": "1.29.0-alpha.5", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42905,10 +42905,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.18", + "version": "1.41.0-alpha.19", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.5", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42969,10 +42969,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.4", + "version": "1.7.0-alpha.5", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.4" + "@bosonprotocol/common": "^1.29.0-alpha.5" }, "devDependencies": { "eslint": "^8.10.0", @@ -42988,10 +42988,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.4", + "version": "1.15.0-alpha.5", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.4" + "@bosonprotocol/common": "^1.29.0-alpha.5" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43008,7 +43008,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.16", + "version": "1.12.0-alpha.17", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43049,13 +43049,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.16", + "version": "0.34.0-alpha.17", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.18", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.4", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.16", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.19", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.5", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.17", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43847,7 +43847,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.18", + "version": "1.34.0-alpha.19", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index 6086b62be..6bab09b1a 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.4", + "version": "1.29.0-alpha.5", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 46134674e..aef5e0ea1 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.18", + "version": "1.41.0-alpha.19", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.4", + "@bosonprotocol/common": "^1.29.0-alpha.5", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index de6447c5d..c10db0dff 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.4", + "version": "1.7.0-alpha.5", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.4" + "@bosonprotocol/common": "^1.29.0-alpha.5" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index 9887ad5f6..1da2828fb 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.4", + "version": "1.15.0-alpha.5", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.4" + "@bosonprotocol/common": "^1.29.0-alpha.5" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index 2f56b5fe2..b61e67222 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.16", + "version": "1.12.0-alpha.17", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 2e40ac959..dd2806198 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.16", + "version": "0.34.0-alpha.17", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.18", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.4", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.16", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.19", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.5", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.17", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index bd78237f5..13b029031 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.18", + "version": "1.34.0-alpha.19", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From 67548999e700d07b6a967be82168b5f73a28ec92 Mon Sep 17 00:00:00 2001 From: max-koz <109581727+max-koz@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:13:32 +0200 Subject: [PATCH 23/65] feat: skeleton cards update (#811) * feat: product card update * Update ProductCard.tsx * CR Fixes * Update ProductCardSkeleton.tsx * fix: cr fixes * feat: add props for cover image * Update ProductCard.styles.ts * feat: skeleton cards update --------- Co-authored-by: Maksymilian Kozak --- .../productCard/ProductCard.styles.ts | 3 +- .../skeleton/CollectionsCardSkeleton.tsx | 83 +++++++++++-------- .../skeleton/ProductCardSkeleton.tsx | 47 +++-------- 3 files changed, 65 insertions(+), 68 deletions(-) diff --git a/packages/react-kit/src/components/productCard/ProductCard.styles.ts b/packages/react-kit/src/components/productCard/ProductCard.styles.ts index 94b1550eb..a3ca7eaf5 100644 --- a/packages/react-kit/src/components/productCard/ProductCard.styles.ts +++ b/packages/react-kit/src/components/productCard/ProductCard.styles.ts @@ -95,12 +95,13 @@ export const ProductCardTitle = styled(Typography).attrs({ color: ${({ theme }) => theme?.colors?.light.black}; word-break: break-word; overflow: hidden; - text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.5em; max-height: calc(1.5em * 2); + white-space: nowrap; + text-overflow: ellipsis; `; export const ProductCardPriceWrapper = styled.div` diff --git a/packages/react-kit/src/components/skeleton/CollectionsCardSkeleton.tsx b/packages/react-kit/src/components/skeleton/CollectionsCardSkeleton.tsx index 3a0ce737a..9f6e240e2 100644 --- a/packages/react-kit/src/components/skeleton/CollectionsCardSkeleton.tsx +++ b/packages/react-kit/src/components/skeleton/CollectionsCardSkeleton.tsx @@ -3,27 +3,44 @@ import styled from "styled-components"; import { theme } from "../../theme"; import { cardWrapperStyles } from "../productCard/commonStyles"; import { LoadingBubble } from "./common"; - +const colors = theme.colors.light; const Container = styled.div` - display: grid; - grid-template-columns: 1fr; - grid-template-rows: repeat(2, min-content); + display: flex; + flex-direction: column; ${cardWrapperStyles} + /* REMs gives bad height here on smaller views */ + height: 279px; + min-width: 265px; `; const ImagesContainer = styled.div` width: 100%; - display: grid; - grid-template-columns: repeat(2, 1fr); - grid-template-rows: repeat(2, 1fr); - grid-column-gap: 1px; - grid-row-gap: 1px; + position: relative; + /* REMs gives bad height here on smaller views */ + height: 208px; + background-color: ${colors.lightGrey}; `; const BottomCard = styled.div` padding: 1rem 1.5rem 1rem 1.5rem; `; +const ImageOne = styled.div` + position: absolute; + top: 50%; + left: 10%; + transform: translateY(-50%); +`; +const ImageTwo = styled.div` + position: absolute; + right: 10%; + top: 5%; +`; +const ImageThree = styled.div` + position: absolute; + right: 10%; + bottom: 5%; +`; type SkeletonCardProps = ButtonHTMLAttributes & { withBottomText?: boolean; }; @@ -31,30 +48,30 @@ export const CollectionsCardSkeleton = (props: SkeletonCardProps) => { return ( - - - - + + + + + + + + + diff --git a/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx b/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx index 460570026..69ec89105 100644 --- a/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx +++ b/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx @@ -2,71 +2,50 @@ import React, { ButtonHTMLAttributes } from "react"; import { BottomText, ProductCardBottom, - ProductCardBottomContent, - ProductCardCreator, - ProductCardCreatorAvatar, - ProductCardCreatorName, ProductCardImageWrapper, - ProductCardPrice, - ProductCardPriceWrapper, ProductCardTitle, ProductCardTitleWrapper, ProductCardWrapper } from "../productCard/ProductCard.styles"; -import { Grid } from "../ui/Grid"; import { theme } from "../../theme"; import { LoadingBubble } from "./common"; +import styled from "styled-components"; type SkeletonCardProps = ButtonHTMLAttributes & { withBottomText?: boolean; }; + +const ProductCardImageWrapperStyled = styled(ProductCardImageWrapper)` + overflow: hidden; + width: 100%; + /* REMs gives bad height here on smaller views */ + max-height: 210px; + min-height: 11.25rem; +`; export const ProductCardSkeleton = (props: SkeletonCardProps) => { const { withBottomText } = props; return ( - + - +
- - - - - - - - - - - - - - - - - - - - - - - - +
{withBottomText && ( - + )}
From fb12be2d60504865402c5daf708593a0a4136344 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 15 Oct 2024 09:17:00 +0000 Subject: [PATCH 24/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index 5871e5dfd..f6613a031 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.10", + "version": "1.7.10-alpha.11", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.5", + "@bosonprotocol/common": "^1.29.0-alpha.6", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index 0dba0f796..ca5d83dc1 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.10", + "version": "1.0.5-alpha.11", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.5", + "@bosonprotocol/common": "^1.29.0-alpha.6", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index 385daa314..10d8afb13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.10", + "version": "1.7.10-alpha.11", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.5", + "@bosonprotocol/common": "^1.29.0-alpha.6", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.10", + "version": "1.0.5-alpha.11", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.5", + "@bosonprotocol/common": "^1.29.0-alpha.6", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42884,7 +42884,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.5", + "version": "1.29.0-alpha.6", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42905,10 +42905,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.19", + "version": "1.41.0-alpha.20", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.5", + "@bosonprotocol/common": "^1.29.0-alpha.6", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42969,10 +42969,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.5", + "version": "1.7.0-alpha.6", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.5" + "@bosonprotocol/common": "^1.29.0-alpha.6" }, "devDependencies": { "eslint": "^8.10.0", @@ -42988,10 +42988,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.5", + "version": "1.15.0-alpha.6", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.5" + "@bosonprotocol/common": "^1.29.0-alpha.6" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43008,7 +43008,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.17", + "version": "1.12.0-alpha.18", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43049,13 +43049,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.17", + "version": "0.34.0-alpha.18", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.19", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.5", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.17", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.20", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.6", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.18", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43847,7 +43847,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.19", + "version": "1.34.0-alpha.20", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index 6bab09b1a..34c5e64bc 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.5", + "version": "1.29.0-alpha.6", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index aef5e0ea1..91ea0f96b 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.19", + "version": "1.41.0-alpha.20", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.5", + "@bosonprotocol/common": "^1.29.0-alpha.6", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index c10db0dff..5b78a1ba4 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.5", + "version": "1.7.0-alpha.6", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.5" + "@bosonprotocol/common": "^1.29.0-alpha.6" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index 1da2828fb..a0629670f 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.5", + "version": "1.15.0-alpha.6", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.5" + "@bosonprotocol/common": "^1.29.0-alpha.6" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index b61e67222..61f1cd42b 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.17", + "version": "1.12.0-alpha.18", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index dd2806198..807a474ca 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.17", + "version": "0.34.0-alpha.18", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.19", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.5", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.17", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.20", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.6", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.18", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 13b029031..1929937e2 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.19", + "version": "1.34.0-alpha.20", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From f6a4d70c0ba93ed87a13160c821aa8118da9810b Mon Sep 17 00:00:00 2001 From: max-koz <109581727+max-koz@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:39:23 +0200 Subject: [PATCH 25/65] fix: remove min height, products skeleton changes (#812) Co-authored-by: Maksymilian Kozak --- .../src/components/productCard/commonStyles.ts | 1 - .../components/skeleton/ProductCardSkeleton.tsx | 17 +++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/react-kit/src/components/productCard/commonStyles.ts b/packages/react-kit/src/components/productCard/commonStyles.ts index ebf554327..816be8722 100644 --- a/packages/react-kit/src/components/productCard/commonStyles.ts +++ b/packages/react-kit/src/components/productCard/commonStyles.ts @@ -5,7 +5,6 @@ export const cardWrapperStyles = css` padding: 0px; isolation: isolate; width: 100%; - min-height: 31.25rem; box-shadow: 0px 4.31783px 107.946px rgba(21, 30, 52, 0.1); background: ${theme.colors.light.white}; `; diff --git a/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx b/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx index 69ec89105..88cc19868 100644 --- a/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx +++ b/packages/react-kit/src/components/skeleton/ProductCardSkeleton.tsx @@ -22,6 +22,10 @@ const ProductCardImageWrapperStyled = styled(ProductCardImageWrapper)` max-height: 210px; min-height: 11.25rem; `; + +const ProductCardTitleWrapperStyled = styled(ProductCardTitleWrapper)` + margin-bottom: 5px; +`; export const ProductCardSkeleton = (props: SkeletonCardProps) => { const { withBottomText } = props; @@ -37,15 +41,20 @@ export const ProductCardSkeleton = (props: SkeletonCardProps) => {
- + + + + + + - + - +
{withBottomText && ( - + )}
From 83234a7d2d0da72604a482c44d1eb43ca5c0541b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 15 Oct 2024 10:42:57 +0000 Subject: [PATCH 26/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index f6613a031..5bca59ac0 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.11", + "version": "1.7.10-alpha.12", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.6", + "@bosonprotocol/common": "^1.29.0-alpha.7", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index ca5d83dc1..f7215cb08 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.11", + "version": "1.0.5-alpha.12", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.6", + "@bosonprotocol/common": "^1.29.0-alpha.7", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index 10d8afb13..07dbfe4cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.11", + "version": "1.7.10-alpha.12", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.6", + "@bosonprotocol/common": "^1.29.0-alpha.7", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.11", + "version": "1.0.5-alpha.12", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.6", + "@bosonprotocol/common": "^1.29.0-alpha.7", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42884,7 +42884,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.6", + "version": "1.29.0-alpha.7", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42905,10 +42905,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.20", + "version": "1.41.0-alpha.21", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.6", + "@bosonprotocol/common": "^1.29.0-alpha.7", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42969,10 +42969,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.6", + "version": "1.7.0-alpha.7", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.6" + "@bosonprotocol/common": "^1.29.0-alpha.7" }, "devDependencies": { "eslint": "^8.10.0", @@ -42988,10 +42988,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.6", + "version": "1.15.0-alpha.7", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.6" + "@bosonprotocol/common": "^1.29.0-alpha.7" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43008,7 +43008,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.18", + "version": "1.12.0-alpha.19", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43049,13 +43049,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.18", + "version": "0.34.0-alpha.19", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.20", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.6", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.18", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.21", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.7", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.19", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43847,7 +43847,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.20", + "version": "1.34.0-alpha.21", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index 34c5e64bc..d62019a2c 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.6", + "version": "1.29.0-alpha.7", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 91ea0f96b..0e34eba26 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.20", + "version": "1.41.0-alpha.21", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.6", + "@bosonprotocol/common": "^1.29.0-alpha.7", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index 5b78a1ba4..6e1068062 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.6", + "version": "1.7.0-alpha.7", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.6" + "@bosonprotocol/common": "^1.29.0-alpha.7" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index a0629670f..af206cac4 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.6", + "version": "1.15.0-alpha.7", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.6" + "@bosonprotocol/common": "^1.29.0-alpha.7" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index 61f1cd42b..1adbbb832 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.18", + "version": "1.12.0-alpha.19", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 807a474ca..72cd07532 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.18", + "version": "0.34.0-alpha.19", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.20", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.6", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.18", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.21", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.7", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.19", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 1929937e2..b48cd1997 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.20", + "version": "1.34.0-alpha.21", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From 283f06f03450a0a7eb486554c2187206951cf05a Mon Sep 17 00:00:00 2001 From: max-koz <109581727+max-koz@users.noreply.github.com> Date: Tue, 15 Oct 2024 17:27:19 +0200 Subject: [PATCH 27/65] feat: fix collection skeleton (#813) * fix: remove min height, products skeleton changes * feat: fix collection skeleton * Update ProductCard.tsx * fix: Currency display changes * feat: exchange card price type change --------- Co-authored-by: Maksymilian Kozak --- .../currencyDisplay/CurrencyDisplay.tsx | 2 +- .../components/exchangeCard/ExchangeCard.tsx | 2 +- .../components/Redeem/MyItems/Exchange.tsx | 2 +- .../components/productCard/ProductCard.tsx | 2 +- .../skeleton/CollectionsCardSkeleton.tsx | 19 +++++++++++++------ 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/react-kit/src/components/currencyDisplay/CurrencyDisplay.tsx b/packages/react-kit/src/components/currencyDisplay/CurrencyDisplay.tsx index d53194074..fb2164460 100644 --- a/packages/react-kit/src/components/currencyDisplay/CurrencyDisplay.tsx +++ b/packages/react-kit/src/components/currencyDisplay/CurrencyDisplay.tsx @@ -26,7 +26,7 @@ export enum Currencies { } interface CurrencyDisplayProps { - value?: number | string; + value?: string; currency: Currencies; height?: number; fontSize?: number | string; diff --git a/packages/react-kit/src/components/exchangeCard/ExchangeCard.tsx b/packages/react-kit/src/components/exchangeCard/ExchangeCard.tsx index 5bd9f39d8..331901cf1 100644 --- a/packages/react-kit/src/components/exchangeCard/ExchangeCard.tsx +++ b/packages/react-kit/src/components/exchangeCard/ExchangeCard.tsx @@ -34,7 +34,7 @@ export type { ExchangeCardStatus } from "./types"; interface Base { id: string; title: string; - price: number; + price: string; currency: Currencies; avatar: string; avatarName: JSX.Element | string; diff --git a/packages/react-kit/src/components/modal/components/Redeem/MyItems/Exchange.tsx b/packages/react-kit/src/components/modal/components/Redeem/MyItems/Exchange.tsx index db00e399b..bb3be8c8b 100644 --- a/packages/react-kit/src/components/modal/components/Redeem/MyItems/Exchange.tsx +++ b/packages/react-kit/src/components/modal/components/Redeem/MyItems/Exchange.tsx @@ -173,7 +173,7 @@ export default function Exchange({ } }} onAvatarNameClick={handleOnAvatarClick} - price={Number(price)} + price={price} currency={offer.exchangeToken.symbol as Currencies} {...createSpecificCardConfig()} /> diff --git a/packages/react-kit/src/components/productCard/ProductCard.tsx b/packages/react-kit/src/components/productCard/ProductCard.tsx index 10a2f5af6..71663aef0 100644 --- a/packages/react-kit/src/components/productCard/ProductCard.tsx +++ b/packages/react-kit/src/components/productCard/ProductCard.tsx @@ -33,7 +33,7 @@ interface IProductCard { isHoverDisabled?: boolean; onAvatarNameClick?: () => void; onCardClick?: (id: string | number) => void; - price: number; + price: string; productId: string; productType?: ProductType; title: string; diff --git a/packages/react-kit/src/components/skeleton/CollectionsCardSkeleton.tsx b/packages/react-kit/src/components/skeleton/CollectionsCardSkeleton.tsx index 9f6e240e2..a52e6952b 100644 --- a/packages/react-kit/src/components/skeleton/CollectionsCardSkeleton.tsx +++ b/packages/react-kit/src/components/skeleton/CollectionsCardSkeleton.tsx @@ -3,6 +3,7 @@ import styled from "styled-components"; import { theme } from "../../theme"; import { cardWrapperStyles } from "../productCard/commonStyles"; import { LoadingBubble } from "./common"; +import { Grid } from "../ui/Grid"; const colors = theme.colors.light; const Container = styled.div` display: flex; @@ -22,7 +23,7 @@ const ImagesContainer = styled.div` `; const BottomCard = styled.div` - padding: 1rem 1.5rem 1rem 1.5rem; + padding: 1rem 1.5rem 1rem 0.3125rem; `; const ImageOne = styled.div` @@ -73,11 +74,17 @@ export const CollectionsCardSkeleton = (props: SkeletonCardProps) => { /> - - - - - + + + + + + +
); }; From b949cfdb47a320474ddc9455c9e3cd697e7b53e1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 15 Oct 2024 15:30:44 +0000 Subject: [PATCH 28/65] chore(release): publish alpha [skip ci] --- e2e/meta-tx-gateway/package.json | 4 ++-- e2e/opensea-api-mock/package.json | 4 ++-- package-lock.json | 34 +++++++++++++-------------- packages/common/package.json | 2 +- packages/core-sdk/package.json | 4 ++-- packages/eth-connect-sdk/package.json | 4 ++-- packages/ethers-sdk/package.json | 4 ++-- packages/ipfs-storage/package.json | 2 +- packages/react-kit/package.json | 8 +++---- packages/subgraph/package.json | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index 5bca59ac0..779865a61 100644 --- a/e2e/meta-tx-gateway/package.json +++ b/e2e/meta-tx-gateway/package.json @@ -1,6 +1,6 @@ { "name": "meta-tx-gateway", - "version": "1.7.10-alpha.12", + "version": "1.7.10-alpha.13", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.7", + "@bosonprotocol/common": "^1.29.0-alpha.8", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", diff --git a/e2e/opensea-api-mock/package.json b/e2e/opensea-api-mock/package.json index f7215cb08..f95b6aa84 100644 --- a/e2e/opensea-api-mock/package.json +++ b/e2e/opensea-api-mock/package.json @@ -1,6 +1,6 @@ { "name": "opensea-api-mock", - "version": "1.0.5-alpha.12", + "version": "1.0.5-alpha.13", "description": "", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/bosonprotocol/core-components#readme", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.7", + "@bosonprotocol/common": "^1.29.0-alpha.8", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", diff --git a/package-lock.json b/package-lock.json index 07dbfe4cd..61808a6f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.10-alpha.12", + "version": "1.7.10-alpha.13", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.7", + "@bosonprotocol/common": "^1.29.0-alpha.8", "cors": "^2.8.5", "dotenv": "^16.0.2", "ethers": "^5.7.0", @@ -143,10 +143,10 @@ } }, "e2e/opensea-api-mock": { - "version": "1.0.5-alpha.12", + "version": "1.0.5-alpha.13", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.7", + "@bosonprotocol/common": "^1.29.0-alpha.8", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42884,7 +42884,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.7", + "version": "1.29.0-alpha.8", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.2", @@ -42905,10 +42905,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.21", + "version": "1.41.0-alpha.22", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.7", + "@bosonprotocol/common": "^1.29.0-alpha.8", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42969,10 +42969,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.7", + "version": "1.7.0-alpha.8", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.7" + "@bosonprotocol/common": "^1.29.0-alpha.8" }, "devDependencies": { "eslint": "^8.10.0", @@ -42988,10 +42988,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.7", + "version": "1.15.0-alpha.8", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.7" + "@bosonprotocol/common": "^1.29.0-alpha.8" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43008,7 +43008,7 @@ }, "packages/ipfs-storage": { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.19", + "version": "1.12.0-alpha.20", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata-storage": "^1.0.1", @@ -43049,13 +43049,13 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.34.0-alpha.19", + "version": "0.34.0-alpha.20", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.21", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.7", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.19", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.22", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.8", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.20", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", @@ -43847,7 +43847,7 @@ }, "packages/subgraph": { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.21", + "version": "1.34.0-alpha.22", "license": "Apache-2.0", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", diff --git a/packages/common/package.json b/packages/common/package.json index d62019a2c..1a5c1ad38 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.29.0-alpha.7", + "version": "1.29.0-alpha.8", "description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 0e34eba26..f13935943 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.41.0-alpha.21", + "version": "1.41.0-alpha.22", "description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.7", + "@bosonprotocol/common": "^1.29.0-alpha.8", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", diff --git a/packages/eth-connect-sdk/package.json b/packages/eth-connect-sdk/package.json index 6e1068062..d49274684 100644 --- a/packages/eth-connect-sdk/package.json +++ b/packages/eth-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.7.0-alpha.7", + "version": "1.7.0-alpha.8", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.7" + "@bosonprotocol/common": "^1.29.0-alpha.8" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index af206cac4..9fa1c0aee 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.15.0-alpha.7", + "version": "1.15.0-alpha.8", "description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -32,7 +32,7 @@ "access": "public" }, "dependencies": { - "@bosonprotocol/common": "^1.29.0-alpha.7" + "@bosonprotocol/common": "^1.29.0-alpha.8" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/ipfs-storage/package.json b/packages/ipfs-storage/package.json index 1adbbb832..1f73d24ae 100644 --- a/packages/ipfs-storage/package.json +++ b/packages/ipfs-storage/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ipfs-storage", - "version": "1.12.0-alpha.19", + "version": "1.12.0-alpha.20", "description": "IPFS metadata storage implementation for building on top of the Boson Protocol.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 72cd07532..3287675c0 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -1,7 +1,7 @@ { "name": "@bosonprotocol/react-kit", "description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.", - "version": "0.34.0-alpha.19", + "version": "0.34.0-alpha.20", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,9 +15,9 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.41.0-alpha.21", - "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.7", - "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.19", + "@bosonprotocol/core-sdk": "^1.41.0-alpha.22", + "@bosonprotocol/ethers-sdk": "^1.15.0-alpha.8", + "@bosonprotocol/ipfs-storage": "^1.12.0-alpha.20", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index b48cd1997..7efa9c5b7 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/subgraph", - "version": "1.34.0-alpha.21", + "version": "1.34.0-alpha.22", "dependencies": { "@graphprotocol/graph-cli": "0.68.5", "@graphprotocol/graph-ts": "0.33.0" From c08b17c6c9c7a032bf8a435048c152d3d8e07822 Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:21:46 +0200 Subject: [PATCH 29/65] feat: remove magic provider if disabled (#815) --- .../src/components/config/ConfigContext.ts | 3 +- .../src/components/config/ConfigProvider.tsx | 7 ++- .../components/magicLink/MagicProvider.tsx | 2 +- .../src/components/magicLink/UserContext.tsx | 13 +++-- .../src/components/wallet/ConnectButton.tsx | 21 ++++---- .../components/wallet2/walletModal/index.tsx | 10 ++-- .../src/hooks/connection/connection.ts | 54 ++++++++++++++----- packages/react-kit/src/hooks/magic.ts | 15 +++--- .../src/stories/widgets/Commit.stories.tsx | 3 +- 9 files changed, 90 insertions(+), 38 deletions(-) diff --git a/packages/react-kit/src/components/config/ConfigContext.ts b/packages/react-kit/src/components/config/ConfigContext.ts index 38c533d7a..b0eddead2 100644 --- a/packages/react-kit/src/components/config/ConfigContext.ts +++ b/packages/react-kit/src/components/config/ConfigContext.ts @@ -11,7 +11,7 @@ export type ConfigContextProps = { symbol: "$" | string; }; usePendingTransactions?: boolean; - magicLinkKey: string; + magicLinkKey?: string; infuraKey: string; supportedChains: number[]; externalConnectedChainId?: number; @@ -20,6 +20,7 @@ export type ConfigContextProps = { withExternalConnectionProps?: boolean; withWeb3React: boolean; withCustomReduxContext?: boolean; + withMagicLink?: boolean; }; export const ConfigContext = createContext< diff --git a/packages/react-kit/src/components/config/ConfigProvider.tsx b/packages/react-kit/src/components/config/ConfigProvider.tsx index 9cd860d95..dda5287f2 100644 --- a/packages/react-kit/src/components/config/ConfigProvider.tsx +++ b/packages/react-kit/src/components/config/ConfigProvider.tsx @@ -48,6 +48,9 @@ export function ConfigProvider({ const Web3ProviderComponent = useMemo(() => { return rest.withWeb3React ? InnerWeb3Provider : Fragment; }, [rest.withWeb3React]); + const MagicLinkProvider = useMemo(() => { + return rest.withMagicLink ? MagicProvider : Fragment; + }, [rest.withMagicLink]); return ( - + {children} - + diff --git a/packages/react-kit/src/components/magicLink/MagicProvider.tsx b/packages/react-kit/src/components/magicLink/MagicProvider.tsx index 503fa56c2..50c5e4507 100644 --- a/packages/react-kit/src/components/magicLink/MagicProvider.tsx +++ b/packages/react-kit/src/components/magicLink/MagicProvider.tsx @@ -13,7 +13,7 @@ export const MagicProvider = ({ children }: { children: ReactNode }) => { return ( {children} diff --git a/packages/react-kit/src/components/magicLink/UserContext.tsx b/packages/react-kit/src/components/magicLink/UserContext.tsx index b4f732965..f0a52baf9 100644 --- a/packages/react-kit/src/components/magicLink/UserContext.tsx +++ b/packages/react-kit/src/components/magicLink/UserContext.tsx @@ -1,14 +1,21 @@ import React, { useContext } from "react"; +import { useConfigContext } from "../config/ConfigContext"; export const UserContext = React.createContext<{ user: string | undefined; setUser: React.Dispatch>; } | null>(null); - +const emptyUserContext = { + user: "", + setUser: () => { + // + } +}; export const useUser = () => { + const { withMagicLink } = useConfigContext(); const value = useContext(UserContext); - if (!value) { + if (!value && withMagicLink) { throw new Error(`useUser must be used under a UserProvider`); } - return value; + return value || emptyUserContext; }; diff --git a/packages/react-kit/src/components/wallet/ConnectButton.tsx b/packages/react-kit/src/components/wallet/ConnectButton.tsx index a6f4b0036..28b273077 100644 --- a/packages/react-kit/src/components/wallet/ConnectButton.tsx +++ b/packages/react-kit/src/components/wallet/ConnectButton.tsx @@ -10,7 +10,7 @@ import ThemedButton, { bosonButtonThemes } from "../ui/ThemedButton"; import { useBreakpoints } from "../../hooks/useBreakpoints"; import { saveItemInStorage } from "../../hooks/storage/useBosonLocalStorage"; import { SignOut, Wallet } from "phosphor-react"; -import { useIsMagicLoggedIn } from "../../hooks"; +import { useConfigContext, useIsMagicLoggedIn } from "../../hooks"; import { useAccount, useChainId } from "../../hooks/connection/connection"; import { useDisconnect } from "../../hooks/connection/useDisconnect"; import { MagicLoginButton } from "../magicLink/Login"; @@ -79,6 +79,7 @@ export default function ConnectButton({ showChangeWallet, ...rest }: Props) { + const { withMagicLink } = useConfigContext(); const { isLteXS, isLteS } = useBreakpoints(); const isSideBar = ["left", "right"].includes(navigationBarPosition); const buttonPadding = isSideBar ? "0.75rem 1rem" : ""; @@ -120,14 +121,16 @@ export default function ConnectButton({ return ( <> - + {withMagicLink && ( + + )}