@bosonprotocol/react-kit 0.30.0-alpha.0 → 0.30.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Loading.js +1 -1
- package/dist/cjs/components/Loading.js.map +1 -1
- package/dist/cjs/components/buttons/CommitButtonView.d.ts +2 -7
- package/dist/cjs/components/buttons/CommitButtonView.d.ts.map +1 -1
- package/dist/cjs/components/buttons/CommitButtonView.js +30 -9
- package/dist/cjs/components/buttons/CommitButtonView.js.map +1 -1
- package/dist/cjs/components/modal/components/Commit/OfferVariantView.d.ts.map +1 -1
- package/dist/cjs/components/modal/components/Commit/OfferVariantView.js +4 -1
- package/dist/cjs/components/modal/components/Commit/OfferVariantView.js.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/Confirmation/Confirmation.d.ts.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/Confirmation/Confirmation.js +4 -1
- package/dist/cjs/components/modal/components/Redeem/Confirmation/Confirmation.js.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemForm/RedeemForm.d.ts +4 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemForm/RedeemForm.d.ts.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemForm/RedeemForm.js +13 -2
- package/dist/cjs/components/modal/components/Redeem/RedeemForm/RedeemForm.js.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemForm/RedeemFormView.d.ts +2 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemForm/RedeemFormView.d.ts.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemForm/RedeemFormView.js +2 -2
- package/dist/cjs/components/modal/components/Redeem/RedeemForm/RedeemFormView.js.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemFormModel.d.ts +7 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemFormModel.d.ts.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemFormModel.js +6 -0
- package/dist/cjs/components/modal/components/Redeem/RedeemFormModel.js.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemNonModal.d.ts.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/RedeemNonModal.js +22 -3
- package/dist/cjs/components/modal/components/Redeem/RedeemNonModal.js.map +1 -1
- package/dist/cjs/components/modal/components/common/OfferFullDescription/DigitalProductData.d.ts.map +1 -1
- package/dist/cjs/components/modal/components/common/OfferFullDescription/DigitalProductData.js +41 -13
- package/dist/cjs/components/modal/components/common/OfferFullDescription/DigitalProductData.js.map +1 -1
- package/dist/cjs/components/modal/components/common/detail/PhygitalProduct.d.ts.map +1 -1
- package/dist/cjs/components/modal/components/common/detail/PhygitalProduct.js +48 -33
- package/dist/cjs/components/modal/components/common/detail/PhygitalProduct.js.map +1 -1
- package/dist/cjs/components/modal/components/common/detail/TokenGatedItem.d.ts.map +1 -1
- package/dist/cjs/components/modal/components/common/detail/TokenGatedItem.js +28 -16
- package/dist/cjs/components/modal/components/common/detail/TokenGatedItem.js.map +1 -1
- package/dist/cjs/components/productCard/ProductCard.d.ts +3 -1
- package/dist/cjs/components/productCard/ProductCard.d.ts.map +1 -1
- package/dist/cjs/components/productCard/ProductCard.js +14 -2
- package/dist/cjs/components/productCard/ProductCard.js.map +1 -1
- package/dist/cjs/components/productCard/ProductCard.styles.d.ts +1 -0
- package/dist/cjs/components/productCard/ProductCard.styles.d.ts.map +1 -1
- package/dist/cjs/components/productCard/ProductCard.styles.js +43 -3
- package/dist/cjs/components/productCard/ProductCard.styles.js.map +1 -1
- package/dist/cjs/components/tooltip/Tooltip.d.ts +3 -2
- package/dist/cjs/components/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/cjs/components/tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/components/ui/DetailsSummary.js +1 -1
- package/dist/cjs/components/ui/DetailsSummary.js.map +1 -1
- package/dist/cjs/components/ui/IpfsImage.d.ts +3 -0
- package/dist/cjs/components/ui/IpfsImage.d.ts.map +1 -1
- package/dist/cjs/components/ui/IpfsImage.js +13 -3
- package/dist/cjs/components/ui/IpfsImage.js.map +1 -1
- package/dist/cjs/hooks/bundles/useBundleItemsImages.d.ts +10 -0
- package/dist/cjs/hooks/bundles/useBundleItemsImages.d.ts.map +1 -0
- package/dist/cjs/hooks/bundles/useBundleItemsImages.js +56 -0
- package/dist/cjs/hooks/bundles/useBundleItemsImages.js.map +1 -0
- package/dist/cjs/hooks/contracts/erc1155/useErc1155Uris.d.ts +11 -0
- package/dist/cjs/hooks/contracts/erc1155/useErc1155Uris.d.ts.map +1 -0
- package/dist/cjs/hooks/contracts/erc1155/useErc1155Uris.js +37 -0
- package/dist/cjs/hooks/contracts/erc1155/useErc1155Uris.js.map +1 -0
- package/dist/cjs/hooks/contracts/erc721/useErc721TokenUris.d.ts +11 -0
- package/dist/cjs/hooks/contracts/erc721/useErc721TokenUris.d.ts.map +1 -0
- package/dist/cjs/hooks/contracts/erc721/useErc721TokenUris.js +37 -0
- package/dist/cjs/hooks/contracts/erc721/useErc721TokenUris.js.map +1 -0
- package/dist/cjs/hooks/contracts/useGetTokenUriImages.d.ts +10 -0
- package/dist/cjs/hooks/contracts/useGetTokenUriImages.d.ts.map +1 -0
- package/dist/cjs/hooks/contracts/useGetTokenUriImages.js +103 -0
- package/dist/cjs/hooks/contracts/useGetTokenUriImages.js.map +1 -0
- package/dist/cjs/hooks/index.d.ts +3 -3
- package/dist/cjs/hooks/index.d.ts.map +1 -1
- package/dist/cjs/hooks/index.js +3 -3
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/transactions/usePendingTransactionsWithContext.d.ts +1 -1
- package/dist/cjs/lib/address/address.d.ts +1 -0
- package/dist/cjs/lib/address/address.d.ts.map +1 -1
- package/dist/cjs/lib/address/address.js +8 -1
- package/dist/cjs/lib/address/address.js.map +1 -1
- package/dist/cjs/lib/bundle/const.d.ts +19 -5
- package/dist/cjs/lib/bundle/const.d.ts.map +1 -1
- package/dist/cjs/lib/bundle/const.js +18 -3
- package/dist/cjs/lib/bundle/const.js.map +1 -1
- package/dist/cjs/lib/ipfs/ipfs.d.ts.map +1 -1
- package/dist/cjs/lib/ipfs/ipfs.js +9 -4
- package/dist/cjs/lib/ipfs/ipfs.js.map +1 -1
- package/dist/cjs/lib/offer/filter.d.ts +3 -0
- package/dist/cjs/lib/offer/filter.d.ts.map +1 -1
- package/dist/cjs/lib/offer/filter.js +21 -1
- package/dist/cjs/lib/offer/filter.js.map +1 -1
- package/dist/cjs/lib/offer/getOfferDetails.d.ts.map +1 -1
- package/dist/cjs/lib/offer/getOfferDetails.js +21 -9
- package/dist/cjs/lib/offer/getOfferDetails.js.map +1 -1
- package/dist/esm/components/Loading.js +1 -1
- package/dist/esm/components/Loading.js.map +1 -1
- package/dist/esm/components/buttons/CommitButtonView.d.ts +2 -7
- package/dist/esm/components/buttons/CommitButtonView.d.ts.map +1 -1
- package/dist/esm/components/buttons/CommitButtonView.js +30 -9
- package/dist/esm/components/buttons/CommitButtonView.js.map +1 -1
- package/dist/esm/components/modal/components/Commit/OfferVariantView.d.ts.map +1 -1
- package/dist/esm/components/modal/components/Commit/OfferVariantView.js +4 -1
- package/dist/esm/components/modal/components/Commit/OfferVariantView.js.map +1 -1
- package/dist/esm/components/modal/components/Redeem/Confirmation/Confirmation.d.ts.map +1 -1
- package/dist/esm/components/modal/components/Redeem/Confirmation/Confirmation.js +4 -1
- package/dist/esm/components/modal/components/Redeem/Confirmation/Confirmation.js.map +1 -1
- package/dist/esm/components/modal/components/Redeem/RedeemForm/RedeemForm.d.ts +4 -1
- package/dist/esm/components/modal/components/Redeem/RedeemForm/RedeemForm.d.ts.map +1 -1
- package/dist/esm/components/modal/components/Redeem/RedeemForm/RedeemForm.js +13 -2
- package/dist/esm/components/modal/components/Redeem/RedeemForm/RedeemForm.js.map +1 -1
- package/dist/esm/components/modal/components/Redeem/RedeemForm/RedeemFormView.d.ts +2 -1
- package/dist/esm/components/modal/components/Redeem/RedeemForm/RedeemFormView.d.ts.map +1 -1
- package/dist/esm/components/modal/components/Redeem/RedeemForm/RedeemFormView.js +2 -2
- package/dist/esm/components/modal/components/Redeem/RedeemForm/RedeemFormView.js.map +1 -1
- package/dist/esm/components/modal/components/Redeem/RedeemFormModel.d.ts +7 -1
- package/dist/esm/components/modal/components/Redeem/RedeemFormModel.d.ts.map +1 -1
- package/dist/esm/components/modal/components/Redeem/RedeemFormModel.js +6 -0
- package/dist/esm/components/modal/components/Redeem/RedeemFormModel.js.map +1 -1
- package/dist/esm/components/modal/components/Redeem/RedeemNonModal.d.ts.map +1 -1
- package/dist/esm/components/modal/components/Redeem/RedeemNonModal.js +22 -3
- package/dist/esm/components/modal/components/Redeem/RedeemNonModal.js.map +1 -1
- package/dist/esm/components/modal/components/common/OfferFullDescription/DigitalProductData.d.ts.map +1 -1
- package/dist/esm/components/modal/components/common/OfferFullDescription/DigitalProductData.js +44 -11
- package/dist/esm/components/modal/components/common/OfferFullDescription/DigitalProductData.js.map +1 -1
- package/dist/esm/components/modal/components/common/detail/PhygitalProduct.d.ts.map +1 -1
- package/dist/esm/components/modal/components/common/detail/PhygitalProduct.js +40 -26
- package/dist/esm/components/modal/components/common/detail/PhygitalProduct.js.map +1 -1
- package/dist/esm/components/modal/components/common/detail/TokenGatedItem.d.ts.map +1 -1
- package/dist/esm/components/modal/components/common/detail/TokenGatedItem.js +28 -16
- package/dist/esm/components/modal/components/common/detail/TokenGatedItem.js.map +1 -1
- package/dist/esm/components/productCard/ProductCard.d.ts +3 -1
- package/dist/esm/components/productCard/ProductCard.d.ts.map +1 -1
- package/dist/esm/components/productCard/ProductCard.js +3 -3
- package/dist/esm/components/productCard/ProductCard.js.map +1 -1
- package/dist/esm/components/productCard/ProductCard.styles.d.ts +1 -0
- package/dist/esm/components/productCard/ProductCard.styles.d.ts.map +1 -1
- package/dist/esm/components/productCard/ProductCard.styles.js +42 -2
- package/dist/esm/components/productCard/ProductCard.styles.js.map +1 -1
- package/dist/esm/components/tooltip/Tooltip.d.ts +3 -2
- package/dist/esm/components/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/esm/components/tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/ui/DetailsSummary.js +1 -1
- package/dist/esm/components/ui/DetailsSummary.js.map +1 -1
- package/dist/esm/components/ui/IpfsImage.d.ts +3 -0
- package/dist/esm/components/ui/IpfsImage.d.ts.map +1 -1
- package/dist/esm/components/ui/IpfsImage.js +14 -4
- package/dist/esm/components/ui/IpfsImage.js.map +1 -1
- package/dist/esm/hooks/bundles/useBundleItemsImages.d.ts +10 -0
- package/dist/esm/hooks/bundles/useBundleItemsImages.d.ts.map +1 -0
- package/dist/esm/hooks/bundles/useBundleItemsImages.js +48 -0
- package/dist/esm/hooks/bundles/useBundleItemsImages.js.map +1 -0
- package/dist/esm/hooks/contracts/erc1155/useErc1155Uris.d.ts +11 -0
- package/dist/esm/hooks/contracts/erc1155/useErc1155Uris.d.ts.map +1 -0
- package/dist/esm/hooks/contracts/erc1155/useErc1155Uris.js +22 -0
- package/dist/esm/hooks/contracts/erc1155/useErc1155Uris.js.map +1 -0
- package/dist/esm/hooks/contracts/erc721/useErc721TokenUris.d.ts +11 -0
- package/dist/esm/hooks/contracts/erc721/useErc721TokenUris.d.ts.map +1 -0
- package/dist/esm/hooks/contracts/erc721/useErc721TokenUris.js +22 -0
- package/dist/esm/hooks/contracts/erc721/useErc721TokenUris.js.map +1 -0
- package/dist/esm/hooks/contracts/useGetTokenUriImages.d.ts +10 -0
- package/dist/esm/hooks/contracts/useGetTokenUriImages.d.ts.map +1 -0
- package/dist/esm/hooks/contracts/useGetTokenUriImages.js +90 -0
- package/dist/esm/hooks/contracts/useGetTokenUriImages.js.map +1 -0
- package/dist/esm/hooks/index.d.ts +3 -3
- package/dist/esm/hooks/index.d.ts.map +1 -1
- package/dist/esm/hooks/index.js +3 -3
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/transactions/usePendingTransactionsWithContext.d.ts +1 -1
- package/dist/esm/lib/address/address.d.ts +1 -0
- package/dist/esm/lib/address/address.d.ts.map +1 -1
- package/dist/esm/lib/address/address.js +6 -0
- package/dist/esm/lib/address/address.js.map +1 -1
- package/dist/esm/lib/bundle/const.d.ts +19 -5
- package/dist/esm/lib/bundle/const.d.ts.map +1 -1
- package/dist/esm/lib/bundle/const.js +17 -2
- package/dist/esm/lib/bundle/const.js.map +1 -1
- package/dist/esm/lib/ipfs/ipfs.d.ts.map +1 -1
- package/dist/esm/lib/ipfs/ipfs.js +9 -4
- package/dist/esm/lib/ipfs/ipfs.js.map +1 -1
- package/dist/esm/lib/offer/filter.d.ts +3 -0
- package/dist/esm/lib/offer/filter.d.ts.map +1 -1
- package/dist/esm/lib/offer/filter.js +18 -0
- package/dist/esm/lib/offer/filter.js.map +1 -1
- package/dist/esm/lib/offer/getOfferDetails.d.ts.map +1 -1
- package/dist/esm/lib/offer/getOfferDetails.js +17 -5
- package/dist/esm/lib/offer/getOfferDetails.js.map +1 -1
- package/package.json +4 -4
- package/src/components/Loading.tsx +1 -1
- package/src/components/buttons/CommitButtonView.tsx +35 -23
- package/src/components/modal/components/Commit/OfferVariantView.tsx +4 -1
- package/src/components/modal/components/Redeem/Confirmation/Confirmation.tsx +6 -1
- package/src/components/modal/components/Redeem/RedeemForm/RedeemForm.tsx +32 -3
- package/src/components/modal/components/Redeem/RedeemForm/RedeemFormView.tsx +5 -1
- package/src/components/modal/components/Redeem/RedeemFormModel.ts +7 -1
- package/src/components/modal/components/Redeem/RedeemNonModal.tsx +29 -2
- package/src/components/modal/components/common/OfferFullDescription/DigitalProductData.tsx +166 -99
- package/src/components/modal/components/common/detail/PhygitalProduct.tsx +75 -34
- package/src/components/modal/components/common/detail/TokenGatedItem.tsx +27 -15
- package/src/components/productCard/ProductCard.styles.ts +43 -2
- package/src/components/productCard/ProductCard.tsx +3 -2
- package/src/components/tooltip/Tooltip.tsx +3 -2
- package/src/components/ui/DetailsSummary.tsx +1 -1
- package/src/components/ui/IpfsImage.tsx +19 -4
- package/src/components/widgets/commit/CommitWidget.tsx +1 -1
- package/src/hooks/bundles/useBundleItemsImages.ts +71 -0
- package/src/hooks/contracts/erc1155/useErc1155Uris.ts +52 -0
- package/src/hooks/contracts/erc721/useErc721TokenUris.ts +52 -0
- package/src/hooks/contracts/useGetTokenUriImages.ts +126 -0
- package/src/hooks/index.ts +3 -3
- package/src/lib/address/address.ts +8 -1
- package/src/lib/bundle/const.ts +20 -3
- package/src/lib/ipfs/ipfs.ts +15 -5
- package/src/lib/offer/filter.ts +28 -0
- package/src/lib/offer/getOfferDetails.ts +30 -16
- package/src/stories/buttons/CommitButtonView.stories.tsx +0 -1
- package/src/stories/widgets/Commit.stories.tsx +3 -3
- package/dist/cjs/components/nftItem/NftItemIcon.d.ts +0 -8
- package/dist/cjs/components/nftItem/NftItemIcon.d.ts.map +0 -1
- package/dist/cjs/components/nftItem/NftItemIcon.js +0 -14
- package/dist/cjs/components/nftItem/NftItemIcon.js.map +0 -1
- package/dist/cjs/hooks/contracts/erc1155/useErc1155Uri.d.ts +0 -9
- package/dist/cjs/hooks/contracts/erc1155/useErc1155Uri.d.ts.map +0 -1
- package/dist/cjs/hooks/contracts/erc1155/useErc1155Uri.js +0 -29
- package/dist/cjs/hooks/contracts/erc1155/useErc1155Uri.js.map +0 -1
- package/dist/cjs/hooks/contracts/erc721/useErc721TokenUri.d.ts +0 -9
- package/dist/cjs/hooks/contracts/erc721/useErc721TokenUri.d.ts.map +0 -1
- package/dist/cjs/hooks/contracts/erc721/useErc721TokenUri.js +0 -29
- package/dist/cjs/hooks/contracts/erc721/useErc721TokenUri.js.map +0 -1
- package/dist/cjs/hooks/contracts/useGetTokenUriImage.d.ts +0 -8
- package/dist/cjs/hooks/contracts/useGetTokenUriImage.d.ts.map +0 -1
- package/dist/cjs/hooks/contracts/useGetTokenUriImage.js +0 -93
- package/dist/cjs/hooks/contracts/useGetTokenUriImage.js.map +0 -1
- package/dist/esm/components/nftItem/NftItemIcon.d.ts +0 -8
- package/dist/esm/components/nftItem/NftItemIcon.d.ts.map +0 -1
- package/dist/esm/components/nftItem/NftItemIcon.js +0 -7
- package/dist/esm/components/nftItem/NftItemIcon.js.map +0 -1
- package/dist/esm/hooks/contracts/erc1155/useErc1155Uri.d.ts +0 -9
- package/dist/esm/hooks/contracts/erc1155/useErc1155Uri.d.ts.map +0 -1
- package/dist/esm/hooks/contracts/erc1155/useErc1155Uri.js +0 -16
- package/dist/esm/hooks/contracts/erc1155/useErc1155Uri.js.map +0 -1
- package/dist/esm/hooks/contracts/erc721/useErc721TokenUri.d.ts +0 -9
- package/dist/esm/hooks/contracts/erc721/useErc721TokenUri.d.ts.map +0 -1
- package/dist/esm/hooks/contracts/erc721/useErc721TokenUri.js +0 -16
- package/dist/esm/hooks/contracts/erc721/useErc721TokenUri.js.map +0 -1
- package/dist/esm/hooks/contracts/useGetTokenUriImage.d.ts +0 -8
- package/dist/esm/hooks/contracts/useGetTokenUriImage.d.ts.map +0 -1
- package/dist/esm/hooks/contracts/useGetTokenUriImage.js +0 -80
- package/dist/esm/hooks/contracts/useGetTokenUriImage.js.map +0 -1
- package/src/components/nftItem/NftItemIcon.tsx +0 -16
- package/src/hooks/contracts/erc1155/useErc1155Uri.ts +0 -31
- package/src/hooks/contracts/erc721/useErc721TokenUri.ts +0 -31
- package/src/hooks/contracts/useGetTokenUriImage.ts +0 -102
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bosonprotocol/react-kit",
|
|
3
3
|
"description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.",
|
|
4
|
-
"version": "0.30.0-alpha.
|
|
4
|
+
"version": "0.30.0-alpha.10",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
7
7
|
"types": "./dist/cjs/index.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"license": "Apache-2.0",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@bosonprotocol/chat-sdk": "^1.3.1-alpha.9",
|
|
18
|
-
"@bosonprotocol/core-sdk": "^1.40.
|
|
19
|
-
"@bosonprotocol/ethers-sdk": "^1.14.
|
|
18
|
+
"@bosonprotocol/core-sdk": "^1.40.2-alpha.7",
|
|
19
|
+
"@bosonprotocol/ethers-sdk": "^1.14.2-alpha.7",
|
|
20
20
|
"@bosonprotocol/ipfs-storage": "^1.11.3",
|
|
21
21
|
"@davatar/react": "1.11.1",
|
|
22
22
|
"@ethersproject/units": "5.6.0",
|
|
@@ -170,5 +170,5 @@
|
|
|
170
170
|
"overrides": {
|
|
171
171
|
"typescript": "^5.1.6"
|
|
172
172
|
},
|
|
173
|
-
"gitHead": "
|
|
173
|
+
"gitHead": "2ad3993ba803cddd58944c0205c51f186b073dcf"
|
|
174
174
|
}
|
|
@@ -5,15 +5,6 @@ import styled, { CSSProperties, css } from "styled-components";
|
|
|
5
5
|
import { IButton } from "../ui/ThemedButton";
|
|
6
6
|
import { SvgImage } from "../ui/SvgImage";
|
|
7
7
|
import { Grid } from "../ui/Grid";
|
|
8
|
-
|
|
9
|
-
const Wrapper = styled.div`
|
|
10
|
-
width: fit-content;
|
|
11
|
-
height: fit-content;
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
align-items: center;
|
|
15
|
-
`;
|
|
16
|
-
|
|
17
8
|
const StyledButton = styled(Button)<{
|
|
18
9
|
$color: CommitButtonViewProps["color"];
|
|
19
10
|
$shape: CommitButtonViewProps["shape"];
|
|
@@ -32,12 +23,41 @@ const StyledButton = styled(Button)<{
|
|
|
32
23
|
return "";
|
|
33
24
|
}}
|
|
34
25
|
svg * {
|
|
26
|
+
fill: black;
|
|
27
|
+
}
|
|
28
|
+
&:not(:disabled) svg * {
|
|
35
29
|
fill: ${({ $color }) => ($color === "black" ? "white" : "black")};
|
|
36
30
|
}
|
|
37
31
|
&:hover:not(:disabled) * {
|
|
38
32
|
fill: ${({ $color }) => ($color === "black" ? "black" : "white")};
|
|
39
33
|
}
|
|
40
34
|
`;
|
|
35
|
+
const Tagline = styled.div`
|
|
36
|
+
margin-top: 3px;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
color: black;
|
|
39
|
+
text-shadow:
|
|
40
|
+
0.07em 0 white,
|
|
41
|
+
0 0.07em white,
|
|
42
|
+
-0.07em 0 white,
|
|
43
|
+
0 -0.07em white,
|
|
44
|
+
-0.07em -0.07em white,
|
|
45
|
+
-0.07em 0.07em white,
|
|
46
|
+
0.07em -0.07em white,
|
|
47
|
+
0.07em 0.07em white;
|
|
48
|
+
`;
|
|
49
|
+
|
|
50
|
+
const Wrapper = styled.div`
|
|
51
|
+
width: fit-content;
|
|
52
|
+
height: fit-content;
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
align-items: center;
|
|
56
|
+
|
|
57
|
+
${StyledButton} {
|
|
58
|
+
transition: background 150ms ease-in-out;
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
41
61
|
|
|
42
62
|
export type CommitButtonViewProps = {
|
|
43
63
|
disabled?: boolean;
|
|
@@ -47,10 +67,8 @@ export type CommitButtonViewProps = {
|
|
|
47
67
|
minHeight?: CSSProperties["minHeight"];
|
|
48
68
|
color?: "green" | "black" | "white";
|
|
49
69
|
shape?: "sharp" | "rounded" | "pill";
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
| { onTaglineClick?: undefined; tagline?: false }
|
|
53
|
-
);
|
|
70
|
+
onTaglineClick?: MouseEventHandler<HTMLDivElement>;
|
|
71
|
+
};
|
|
54
72
|
|
|
55
73
|
const colorToVariant = {
|
|
56
74
|
green: "bosonPrimary",
|
|
@@ -70,7 +88,6 @@ export const CommitButtonView = forwardRef<
|
|
|
70
88
|
minHeight,
|
|
71
89
|
layout = "horizontal",
|
|
72
90
|
color = "green",
|
|
73
|
-
tagline = true,
|
|
74
91
|
onTaglineClick,
|
|
75
92
|
shape = "sharp"
|
|
76
93
|
},
|
|
@@ -103,15 +120,10 @@ export const CommitButtonView = forwardRef<
|
|
|
103
120
|
/>
|
|
104
121
|
</Grid>
|
|
105
122
|
</StyledButton>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
style={{ cursor: "pointer" }}
|
|
111
|
-
>
|
|
112
|
-
What is a physical NFT?
|
|
113
|
-
</div>
|
|
114
|
-
)}
|
|
123
|
+
|
|
124
|
+
<Tagline role="button" onClick={onTaglineClick}>
|
|
125
|
+
What is a physical NFT?
|
|
126
|
+
</Tagline>
|
|
115
127
|
</Wrapper>
|
|
116
128
|
);
|
|
117
129
|
}
|
|
@@ -26,6 +26,7 @@ import { DetailContextProps } from "../common/detail/DetailViewProvider";
|
|
|
26
26
|
import { OnClickBuyOrSwapHandler } from "../common/detail/types";
|
|
27
27
|
import { UseGetOfferDetailDataProps } from "../common/detail/useGetOfferDetailData";
|
|
28
28
|
import { BosonLogo } from "../common/BosonLogo";
|
|
29
|
+
import { PhygitalLabel } from "../../../productCard/ProductCard";
|
|
29
30
|
|
|
30
31
|
const colors = theme.colors.light;
|
|
31
32
|
const ImageWrapper = styled.div`
|
|
@@ -36,6 +37,7 @@ const ImageWrapper = styled.div`
|
|
|
36
37
|
${breakpoint.s} {
|
|
37
38
|
max-width: 35rem !important;
|
|
38
39
|
}
|
|
40
|
+
overflow: hidden;
|
|
39
41
|
`;
|
|
40
42
|
|
|
41
43
|
const ImageAndSellerIdContainer = styled(Grid)`
|
|
@@ -173,7 +175,8 @@ export function OfferVariantView({
|
|
|
173
175
|
>
|
|
174
176
|
<ImageAndSellerIdContainer flexDirection="column" flex={1}>
|
|
175
177
|
<ImageWrapper>
|
|
176
|
-
|
|
178
|
+
<PhygitalLabel />
|
|
179
|
+
{!!mediaFiles.length && (
|
|
177
180
|
<DetailSlider
|
|
178
181
|
mediaFiles={mediaFiles}
|
|
179
182
|
sliderOptions={sliderOptions}
|
|
@@ -134,6 +134,9 @@ export default function Confirmation({
|
|
|
134
134
|
const [zipField] = useField(FormModel.formFields.zip.name);
|
|
135
135
|
const [countryField] = useField(FormModel.formFields.country.name);
|
|
136
136
|
const [emailField] = useField(FormModel.formFields.email.name);
|
|
137
|
+
const [walletAddressField] = useField(
|
|
138
|
+
FormModel.formFields.walletAddress.name
|
|
139
|
+
);
|
|
137
140
|
const [phoneField] = useField(FormModel.formFields.phone.name);
|
|
138
141
|
const redemptionInfo = {
|
|
139
142
|
exchangeId,
|
|
@@ -249,7 +252,8 @@ ${FormModel.formFields.state.placeholder}: ${message.deliveryDetails.state}
|
|
|
249
252
|
${FormModel.formFields.zip.placeholder}: ${message.deliveryDetails.zip}
|
|
250
253
|
${FormModel.formFields.country.placeholder}: ${message.deliveryDetails.country}
|
|
251
254
|
${FormModel.formFields.email.placeholder}: ${message.deliveryDetails.email}
|
|
252
|
-
${FormModel.formFields.phone.placeholder}: ${message.deliveryDetails.phone}
|
|
255
|
+
${FormModel.formFields.phone.placeholder}: ${message.deliveryDetails.phone}
|
|
256
|
+
${FormModel.formFields.walletAddress.placeholder}: ${message.deliveryDetails.walletAddress}`;
|
|
253
257
|
|
|
254
258
|
const newMessage = {
|
|
255
259
|
threadId: {
|
|
@@ -300,6 +304,7 @@ ${FormModel.formFields.phone.placeholder}: ${message.deliveryDetails.phone}`;
|
|
|
300
304
|
<div>{zipField.value}</div>
|
|
301
305
|
<div>{countryField.value}</div>
|
|
302
306
|
<div>{emailField.value}</div>
|
|
307
|
+
<div>{walletAddressField.value}</div>
|
|
303
308
|
<div>{phoneField.value}</div>
|
|
304
309
|
</Grid>
|
|
305
310
|
<Grid flexDirection="row" flexBasis="0">
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { Country as CountryCode } from "react-phone-number-input";
|
|
2
3
|
import { useBreakpoints } from "../../../../../hooks/useBreakpoints";
|
|
4
|
+
import { BuyerTransferInfo } from "../../../../../lib/bundle/const";
|
|
5
|
+
import { getHasBuyerTransferInfos } from "../../../../../lib/offer/filter";
|
|
6
|
+
import { Exchange } from "../../../../../types/exchange";
|
|
3
7
|
import { Button } from "../../../../buttons/Button";
|
|
8
|
+
import { CountrySelect } from "../../../../form/CountrySelect";
|
|
4
9
|
import Input from "../../../../form/Input";
|
|
5
10
|
import Phone from "../../../../form/Phone";
|
|
6
11
|
import { Grid } from "../../../../ui/Grid";
|
|
7
12
|
import { Typography } from "../../../../ui/Typography";
|
|
8
13
|
import { FormModel } from "../RedeemFormModel";
|
|
9
|
-
import { CountrySelect } from "../../../../form/CountrySelect";
|
|
10
|
-
import type { Country as CountryCode } from "react-phone-number-input";
|
|
11
14
|
interface Props {
|
|
15
|
+
exchange: Exchange | null;
|
|
12
16
|
isValid: boolean;
|
|
13
17
|
onNextClick: () => void;
|
|
14
18
|
onBackClick: () => void;
|
|
19
|
+
setConnectedWalletAddress: () => void;
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
// https://www.fatf-gafi.org/en/countries.html
|
|
@@ -55,11 +60,18 @@ const fatfMemberCountries: CountryCode[] = [
|
|
|
55
60
|
];
|
|
56
61
|
|
|
57
62
|
export default function RedeemForm({
|
|
63
|
+
exchange,
|
|
58
64
|
isValid,
|
|
59
65
|
onNextClick,
|
|
60
|
-
onBackClick
|
|
66
|
+
onBackClick,
|
|
67
|
+
setConnectedWalletAddress
|
|
61
68
|
}: Props) {
|
|
62
69
|
const { isLteXS } = useBreakpoints();
|
|
70
|
+
const requestBuyerAddress = exchange?.offer
|
|
71
|
+
? getHasBuyerTransferInfos(exchange.offer, [
|
|
72
|
+
BuyerTransferInfo.walletAddress
|
|
73
|
+
])
|
|
74
|
+
: false;
|
|
63
75
|
return (
|
|
64
76
|
<>
|
|
65
77
|
<Typography
|
|
@@ -142,6 +154,23 @@ export default function RedeemForm({
|
|
|
142
154
|
placeholder={FormModel.formFields.email.placeholder}
|
|
143
155
|
/>
|
|
144
156
|
</Grid>
|
|
157
|
+
{requestBuyerAddress && (
|
|
158
|
+
<Grid gap="1rem">
|
|
159
|
+
<Grid flexDirection="column" alignItems="flex-start">
|
|
160
|
+
<Input
|
|
161
|
+
name={FormModel.formFields.walletAddress.name}
|
|
162
|
+
placeholder={FormModel.formFields.walletAddress.placeholder}
|
|
163
|
+
/>
|
|
164
|
+
</Grid>
|
|
165
|
+
<Button
|
|
166
|
+
variant="secondaryFill"
|
|
167
|
+
onClick={() => setConnectedWalletAddress()}
|
|
168
|
+
style={{ whiteSpace: "nowrap" }}
|
|
169
|
+
>
|
|
170
|
+
Use my wallet address
|
|
171
|
+
</Button>
|
|
172
|
+
</Grid>
|
|
173
|
+
)}
|
|
145
174
|
<Grid flexDirection="column" alignItems="flex-start">
|
|
146
175
|
<Phone
|
|
147
176
|
name={FormModel.formFields.phone.name}
|
|
@@ -14,13 +14,15 @@ interface Props {
|
|
|
14
14
|
isValid: boolean;
|
|
15
15
|
onNextClick: () => void;
|
|
16
16
|
onBackClick: () => void;
|
|
17
|
+
setConnectedWalletAddress: () => void;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export default function RedeemFormView({
|
|
20
21
|
exchange,
|
|
21
22
|
isValid,
|
|
22
23
|
onNextClick,
|
|
23
|
-
onBackClick
|
|
24
|
+
onBackClick,
|
|
25
|
+
setConnectedWalletAddress
|
|
24
26
|
}: Props) {
|
|
25
27
|
const { address } = useAccount();
|
|
26
28
|
const dispatch = useNonModalContext();
|
|
@@ -45,9 +47,11 @@ export default function RedeemFormView({
|
|
|
45
47
|
<p>Invalid exchange state.</p>
|
|
46
48
|
) : (
|
|
47
49
|
<RedeemForm
|
|
50
|
+
exchange={exchange}
|
|
48
51
|
isValid={isValid}
|
|
49
52
|
onNextClick={onNextClick}
|
|
50
53
|
onBackClick={onBackClick}
|
|
54
|
+
setConnectedWalletAddress={setConnectedWalletAddress}
|
|
51
55
|
/>
|
|
52
56
|
)}
|
|
53
57
|
</>
|
|
@@ -36,6 +36,12 @@ export const FormModel = {
|
|
|
36
36
|
placeholder: "Email",
|
|
37
37
|
mustBeEmail: "This is not an e-mail"
|
|
38
38
|
},
|
|
39
|
+
walletAddress: {
|
|
40
|
+
name: "walletAddress",
|
|
41
|
+
requiredErrorMessage: "This field is required",
|
|
42
|
+
placeholder: "Wallet Address: Required to receive the digital item/s",
|
|
43
|
+
mustBeWalletAddress: "This is not a wallet address"
|
|
44
|
+
},
|
|
39
45
|
phone: {
|
|
40
46
|
name: "phone",
|
|
41
47
|
requiredErrorMessage: "This field is required",
|
|
@@ -44,4 +50,4 @@ export const FormModel = {
|
|
|
44
50
|
}
|
|
45
51
|
} as const;
|
|
46
52
|
|
|
47
|
-
export type FormType = Record<keyof typeof FormModel["formFields"], string>;
|
|
53
|
+
export type FormType = Record<keyof (typeof FormModel)["formFields"], string>;
|
|
@@ -56,6 +56,8 @@ import {
|
|
|
56
56
|
DetailContextProps,
|
|
57
57
|
DetailViewProvider
|
|
58
58
|
} from "../common/detail/DetailViewProvider";
|
|
59
|
+
import { getHasBuyerTransferInfos } from "../../../../lib/offer/filter";
|
|
60
|
+
import { BuyerTransferInfo } from "../../../../lib/bundle/const";
|
|
59
61
|
|
|
60
62
|
const colors = theme.colors.light;
|
|
61
63
|
const UlWithWordBreak = styled.ul`
|
|
@@ -328,6 +330,11 @@ function RedeemNonModal({
|
|
|
328
330
|
const emailPreference =
|
|
329
331
|
exchange?.seller.metadata?.contactPreference ===
|
|
330
332
|
ContactPreference.XMTP_AND_EMAIL;
|
|
333
|
+
const requestBuyerAddress = exchange?.offer
|
|
334
|
+
? getHasBuyerTransferInfos(exchange.offer, [
|
|
335
|
+
BuyerTransferInfo.walletAddress
|
|
336
|
+
])
|
|
337
|
+
: false;
|
|
331
338
|
const validationSchema = useMemo(() => {
|
|
332
339
|
return Yup.object({
|
|
333
340
|
[FormModel.formFields.name.name]: Yup.string()
|
|
@@ -356,11 +363,21 @@ function RedeemNonModal({
|
|
|
356
363
|
.required(FormModel.formFields.email.requiredErrorMessage)
|
|
357
364
|
.email(FormModel.formFields.email.mustBeEmail)
|
|
358
365
|
: Yup.string().trim().email(FormModel.formFields.email.mustBeEmail),
|
|
366
|
+
[FormModel.formFields.walletAddress.name]: requestBuyerAddress
|
|
367
|
+
? Yup.string()
|
|
368
|
+
.trim()
|
|
369
|
+
.required(FormModel.formFields.walletAddress.requiredErrorMessage)
|
|
370
|
+
.test(
|
|
371
|
+
"mustBeAddress",
|
|
372
|
+
FormModel.formFields.walletAddress.mustBeWalletAddress,
|
|
373
|
+
(value) => (value ? ethers.utils.isAddress(value) : true)
|
|
374
|
+
)
|
|
375
|
+
: Yup.string().trim(),
|
|
359
376
|
[FormModel.formFields.phone.name]: Yup.string()
|
|
360
377
|
.trim()
|
|
361
378
|
.required(FormModel.formFields.phone.requiredErrorMessage)
|
|
362
379
|
});
|
|
363
|
-
}, [emailPreference]);
|
|
380
|
+
}, [emailPreference, requestBuyerAddress]);
|
|
364
381
|
type FormType = Yup.InferType<typeof validationSchema>;
|
|
365
382
|
const [{ currentStep }, setStep] = useState<{
|
|
366
383
|
previousStep: ActiveStep[];
|
|
@@ -495,12 +512,13 @@ function RedeemNonModal({
|
|
|
495
512
|
[FormModel.formFields.zip.name]: "",
|
|
496
513
|
[FormModel.formFields.country.name]: "",
|
|
497
514
|
[FormModel.formFields.email.name]: "",
|
|
515
|
+
[FormModel.formFields.walletAddress.name]: "",
|
|
498
516
|
[FormModel.formFields.phone.name]: ""
|
|
499
517
|
}
|
|
500
518
|
}
|
|
501
519
|
validateOnMount
|
|
502
520
|
>
|
|
503
|
-
{({ errors }) => {
|
|
521
|
+
{({ errors, setFieldValue }) => {
|
|
504
522
|
const isRedeemFormOK =
|
|
505
523
|
!errors[FormModel.formFields.name.name] &&
|
|
506
524
|
!errors[FormModel.formFields.streetNameAndNumber.name] &&
|
|
@@ -509,6 +527,7 @@ function RedeemNonModal({
|
|
|
509
527
|
!errors[FormModel.formFields.zip.name] &&
|
|
510
528
|
!errors[FormModel.formFields.country.name] &&
|
|
511
529
|
!errors[FormModel.formFields.email.name] &&
|
|
530
|
+
!errors[FormModel.formFields.walletAddress.name] &&
|
|
512
531
|
!errors[FormModel.formFields.phone.name];
|
|
513
532
|
|
|
514
533
|
return (
|
|
@@ -646,6 +665,14 @@ function RedeemNonModal({
|
|
|
646
665
|
setActiveStep(ActiveStep.REDEEM_FORM_CONFIRMATION)
|
|
647
666
|
}
|
|
648
667
|
isValid={isRedeemFormOK}
|
|
668
|
+
setConnectedWalletAddress={() => {
|
|
669
|
+
if (address) {
|
|
670
|
+
setFieldValue(
|
|
671
|
+
FormModel.formFields.walletAddress.name,
|
|
672
|
+
address
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
}}
|
|
649
676
|
/>
|
|
650
677
|
) : currentStep === ActiveStep.EXCHANGE_POLICY ? (
|
|
651
678
|
<RedeemOfferPolicyView
|