diff --git a/e2e/meta-tx-gateway/package.json b/e2e/meta-tx-gateway/package.json index d5891a763..e87ca794f 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.8-alpha.3", + "version": "1.7.8-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.0-alpha.3", + "@bosonprotocol/common": "^1.28.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 a2f0ec44d..fc1589ded 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.3-alpha.3", + "version": "1.0.3-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.0-alpha.3", + "@bosonprotocol/common": "^1.28.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 6ef10381f..5afd1e8b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,10 +47,10 @@ } }, "e2e/meta-tx-gateway": { - "version": "1.7.8-alpha.3", + "version": "1.7.8-alpha.5", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.0-alpha.3", + "@bosonprotocol/common": "^1.28.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.3-alpha.3", + "version": "1.0.3-alpha.5", "license": "ISC", "dependencies": { - "@bosonprotocol/common": "^1.28.0-alpha.3", + "@bosonprotocol/common": "^1.28.0-alpha.5", "@opensea/seaport-js": "^4.0.0", "cors": "^2.8.5", "dotenv": "^16.0.2", @@ -42879,7 +42879,7 @@ }, "packages/common": { "name": "@bosonprotocol/common", - "version": "1.28.0-alpha.3", + "version": "1.28.0-alpha.5", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/metadata": "^1.16.1", @@ -42900,10 +42900,10 @@ }, "packages/core-sdk": { "name": "@bosonprotocol/core-sdk", - "version": "1.40.4-alpha.3", + "version": "1.40.4-alpha.5", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.0-alpha.3", + "@bosonprotocol/common": "^1.28.0-alpha.5", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -42964,10 +42964,10 @@ }, "packages/eth-connect-sdk": { "name": "@bosonprotocol/eth-connect-sdk", - "version": "1.6.7-alpha.3", + "version": "1.6.7-alpha.5", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.0-alpha.3" + "@bosonprotocol/common": "^1.28.0-alpha.5" }, "devDependencies": { "eslint": "^8.10.0", @@ -42983,10 +42983,10 @@ }, "packages/ethers-sdk": { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.4-alpha.3", + "version": "1.14.4-alpha.5", "license": "Apache-2.0", "dependencies": { - "@bosonprotocol/common": "^1.28.0-alpha.3" + "@bosonprotocol/common": "^1.28.0-alpha.5" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", @@ -43038,12 +43038,12 @@ }, "packages/react-kit": { "name": "@bosonprotocol/react-kit", - "version": "0.32.0-alpha.5", + "version": "0.32.0-alpha.7", "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.40.4-alpha.3", - "@bosonprotocol/ethers-sdk": "^1.14.4-alpha.3", + "@bosonprotocol/core-sdk": "^1.40.4-alpha.5", + "@bosonprotocol/ethers-sdk": "^1.14.4-alpha.5", "@bosonprotocol/ipfs-storage": "^1.11.3", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", diff --git a/packages/common/package.json b/packages/common/package.json index 5fce9267f..2f455c266 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/common", - "version": "1.28.0-alpha.3", + "version": "1.28.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/common/src/configs.ts b/packages/common/src/configs.ts index f58278173..70f3af2be 100644 --- a/packages/common/src/configs.ts +++ b/packages/common/src/configs.ts @@ -53,7 +53,7 @@ export const envConfigs: Record = { nativeCoin: chainIdToInfo.get(80002), getTxExplorerUrl: chainIdToGraphTx.get(80002), subgraphUrl: - "https://api.studio.thegraph.com/query/71250/llx-amoy-testing/v0.0.1", + "https://api.studio.thegraph.com/query/19713/boson-testing-amoy/v0.0.1", jsonRpcUrl: "https://polygon-amoy.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0", @@ -82,7 +82,7 @@ export const envConfigs: Record = { nativeCoin: chainIdToInfo.get(11155111), getTxExplorerUrl: chainIdToGraphTx.get(11155111), subgraphUrl: - "https://api.thegraph.com/subgraphs/name/bosonprotocol/sepolia-testing", + "https://api.studio.thegraph.com/query/19713/boson-testing-sepolia/v0.0.1", jsonRpcUrl: "https://sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0", @@ -109,7 +109,7 @@ export const envConfigs: Record = { nativeCoin: chainIdToInfo.get(80002), getTxExplorerUrl: chainIdToGraphTx.get(80002), subgraphUrl: - "https://api.studio.thegraph.com/query/71250/llx-amoy-staging/v0.0.1", + "https://api.studio.thegraph.com/query/19713/boson-staging-amoy/v0.0.1", jsonRpcUrl: "https://polygon-amoy.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0", @@ -138,7 +138,7 @@ export const envConfigs: Record = { nativeCoin: chainIdToInfo.get(11155111), getTxExplorerUrl: chainIdToGraphTx.get(11155111), subgraphUrl: - "https://api.thegraph.com/subgraphs/name/bosonprotocol/sepolia-staging", + "https://api.studio.thegraph.com/query/19713/boson-staging-sepolia/v0.0.1", jsonRpcUrl: "https://sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0", @@ -165,7 +165,7 @@ export const envConfigs: Record = { nativeCoin: chainIdToInfo.get(137), getTxExplorerUrl: chainIdToGraphTx.get(137), subgraphUrl: - "https://api.thegraph.com/subgraphs/name/bosonprotocol/polygon", + "https://api.studio.thegraph.com/query/19713/boson-polygon/v0.0.1", jsonRpcUrl: "https://polygon-mainnet.infura.io/v3/383117b55d614525b07f03b5979c5f19", theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0", @@ -194,7 +194,7 @@ export const envConfigs: Record = { nativeCoin: chainIdToInfo.get(1), getTxExplorerUrl: chainIdToGraphTx.get(1), subgraphUrl: - "https://api.thegraph.com/subgraphs/name/bosonprotocol/ethereum", + "https://api.studio.thegraph.com/query/19713/boson-ethereum/v0.0.1", jsonRpcUrl: "https://mainnet.infura.io/v3/b5b499e704f840b5b84b0580466d658e", theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0", diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 28be87659..b0a591ed8 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/core-sdk", - "version": "1.40.4-alpha.3", + "version": "1.40.4-alpha.5", "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.0-alpha.3", + "@bosonprotocol/common": "^1.28.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 f2fa96474..8a76f138e 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.7-alpha.3", + "version": "1.6.7-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.28.0-alpha.3" + "@bosonprotocol/common": "^1.28.0-alpha.5" }, "devDependencies": { "eslint": "^8.10.0", diff --git a/packages/ethers-sdk/package.json b/packages/ethers-sdk/package.json index cbfb96146..0fcc0ac3b 100644 --- a/packages/ethers-sdk/package.json +++ b/packages/ethers-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bosonprotocol/ethers-sdk", - "version": "1.14.4-alpha.3", + "version": "1.14.4-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.28.0-alpha.3" + "@bosonprotocol/common": "^1.28.0-alpha.5" }, "devDependencies": { "@typechain/ethers-v5": "^9.0.0", diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 713728576..2b1a87e6a 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.32.0-alpha.5", + "version": "0.32.0-alpha.7", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/cjs/index.d.ts", @@ -15,8 +15,8 @@ "license": "Apache-2.0", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.40.4-alpha.3", - "@bosonprotocol/ethers-sdk": "^1.14.4-alpha.3", + "@bosonprotocol/core-sdk": "^1.40.4-alpha.5", + "@bosonprotocol/ethers-sdk": "^1.14.4-alpha.5", "@bosonprotocol/ipfs-storage": "^1.11.3", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", diff --git a/packages/react-kit/src/components/modal/components/Redeem/RedeemNonModal.tsx b/packages/react-kit/src/components/modal/components/Redeem/RedeemNonModal.tsx index bbde44431..486712dab 100644 --- a/packages/react-kit/src/components/modal/components/Redeem/RedeemNonModal.tsx +++ b/packages/react-kit/src/components/modal/components/Redeem/RedeemNonModal.tsx @@ -483,9 +483,11 @@ function RedeemNonModal({ return jsx; } const deliveryAddressVar = - process?.env?.REACT_APP_DELIVERY_ADDRESS_MOCK || - // @ts-expect-error import.meta.env only exists in vite environments - import.meta?.env?.REACT_APP_DELIVERY_ADDRESS_MOCK; + typeof process !== "undefined" + ? process?.env?.REACT_APP_DELIVERY_ADDRESS_MOCK || // @ts-expect-error import.meta.env only exists in vite environments + import.meta?.env?.REACT_APP_DELIVERY_ADDRESS_MOCK + : // @ts-expect-error import.meta.env only exists in vite environments + import.meta?.env?.REACT_APP_DELIVERY_ADDRESS_MOCK; const mockedDeliveryAddress = deliveryAddressVar ? JSON.parse(deliveryAddressVar) : undefined; diff --git a/packages/react-kit/src/stories/buttons/Button2.stories.tsx b/packages/react-kit/src/stories/buttons/Button2.stories.tsx new file mode 100644 index 000000000..f3028587b --- /dev/null +++ b/packages/react-kit/src/stories/buttons/Button2.stories.tsx @@ -0,0 +1,110 @@ +import { fn } from "@storybook/test"; +import { Button } from "../../components/buttons/Button"; +import React from "react"; +import { Meta } from "@storybook/react"; + +// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export +export default { + title: "Visual Components/Buttons/Button", + component: Button, + parameters: { + // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout + layout: "centered" + }, + // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs + tags: ["autodocs"], + args: { onClick: fn() }, + argTypes: { + disabled: { control: "boolean" }, + size: { + control: "select", + options: ["small", "regular", "large"] + }, + children: { control: "text" }, + tooltip: { control: "text" } + }, + decorators: [ + (Story) => { + return ; + } + ] +} satisfies Meta; + +const BASE_ARGS = { + children: "Button Text", + size: "regular", + tooltip: "tooltip shown when disabled only" +} as const; + +// More on args: https://storybook.js.org/docs/react/writing-stories/args +export const PrimaryFill = { + args: { + ...BASE_ARGS, + disabled: false, + loading: false, + variant: "primaryFill" + } +}; + +export const PrimaryInverted = { + args: { + ...BASE_ARGS, + disabled: false, + loading: false, + variant: "primaryInverted" + } +}; + +export const SecondaryFill = { + args: { + ...BASE_ARGS, + disabled: false, + loading: false, + variant: "secondaryFill" + } +}; + +export const SecondaryInverted = { + args: { + ...BASE_ARGS, + disabled: false, + loading: false, + variant: "secondaryInverted" + } +}; + +export const AccentFill = { + args: { + ...BASE_ARGS, + disabled: false, + loading: false, + variant: "accentFill" + } +}; + +export const AccentInverted = { + args: { + ...BASE_ARGS, + disabled: false, + loading: false, + variant: "accentInverted" + } +}; + +export const Disabled = { + args: { + ...BASE_ARGS, + disabled: true, + loading: false, + variant: "primaryFill" + } +}; + +export const Loading = { + args: { + ...BASE_ARGS, + disabled: false, + loading: true, + variant: "primaryFill" + } +}; diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index c9a80ef09..3961f1733 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -28,12 +28,12 @@ "create:local": "graph create --node http://localhost:8020/ boson/corecomponents", "remove:local": "graph remove --node http://localhost:8020/ boson/corecomponents", "deploy:local": "npm run manifest:local && npm run create:local && graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 boson/corecomponents -l 0.0.1", - "deploy:testing:amoy": "npm run manifest:testing:amoy && graph deploy --studio --ipfs https://api.thegraph.com/ipfs/ -l v0.0.1 llx-amoy-testing", - "deploy:testing:sepolia": "npm run manifest:testing:sepolia && graph deploy --node https://api.thegraph.com/deploy/ --product hosted-service --ipfs https://api.thegraph.com/ipfs/ bosonprotocol/sepolia-testing", - "deploy:staging:amoy": "npm run manifest:staging:amoy && graph deploy --studio --ipfs https://api.thegraph.com/ipfs/ -l v0.0.1 llx-amoy-staging", - "deploy:staging:sepolia": "npm run manifest:staging:sepolia && graph deploy --node https://api.thegraph.com/deploy/ --product hosted-service --ipfs https://api.thegraph.com/ipfs/ bosonprotocol/sepolia-staging", - "deploy:production": "npm run manifest:production && graph deploy --node https://api.thegraph.com/deploy/ --product hosted-service --ipfs https://api.thegraph.com/ipfs/ bosonprotocol/polygon", - "deploy:production:ethereum": "npm run manifest:production:ethereum && graph deploy --node https://api.thegraph.com/deploy/ --product hosted-service --ipfs https://api.thegraph.com/ipfs/ bosonprotocol/ethereum", + "deploy:testing:amoy": "npm run manifest:testing:amoy && graph deploy --studio --ipfs https://api.thegraph.com/ipfs/ -l v0.0.1 boson-testing-amoy", + "deploy:testing:sepolia": "npm run manifest:testing:sepolia && graph deploy --studio --ipfs https://api.thegraph.com/ipfs/ -l v0.0.1 boson-testing-sepolia", + "deploy:staging:amoy": "npm run manifest:staging:amoy && graph deploy --studio --ipfs https://api.thegraph.com/ipfs/ -l v0.0.1 boson-staging-amoy", + "deploy:staging:sepolia": "npm run manifest:staging:sepolia && graph deploy --studio --ipfs https://api.thegraph.com/ipfs/ -l v0.0.1 boson-staging-sepolia", + "deploy:production": "npm run manifest:production && graph deploy --studio --ipfs https://api.thegraph.com/ipfs/ -l v0.0.1 boson-polygon", + "deploy:production:ethereum": "npm run manifest:production:ethereum && graph deploy --studio --ipfs https://api.thegraph.com/ipfs/ -l v0.0.1 boson-ethereum", "test": "npm run manifest:local && graph test" } }