Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
ENV_NAME: "production"
UPDATE_COVERAGE: false
REACT_APP_ENABLE_CURATION_LISTS: true
REACT_APP_SELLER_CURATION_LIST: "2,4,5,6,7,8,9,11,12,13,14,16,27,129,171,172,180,181,182,183,184,190,191,195,196"
REACT_APP_SELLER_CURATION_LIST: "2,4,5,6,7,8,9,11,12,13,14,16,27,129,171,172,180,181,182,183,184,190,191,195,196,197,202,207"
REACT_APP_CREATE_PROFILE_CONFIGURATION: "LENS"
REACT_APP_IPFS_GATEWAY: "https://bosonprotocol.infura-ipfs.io/ipfs"
REACT_APP_IPFS_IMAGE_GATEWAY: "https://gray-permanent-fly-490.mypinata.cloud/ipfs"
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added src/assets/fonts/neuropolitical_rg.ttf
Binary file not shown.
4 changes: 3 additions & 1 deletion src/components/detail/DetailWidget/TokenGated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CONFIG } from "../../../lib/config";
import { colors } from "../../../lib/styles/colors";
import { Offer } from "../../../lib/types/offer";
import { IPrice } from "../../../lib/utils/convertPrice";
import { sanitizeUrl } from "../../../lib/utils/url";
import { useCoreSDK } from "../../../lib/utils/useCoreSdk";
import { useConvertedPrice } from "../../price/useConvertedPrice";
import Grid from "../../ui/Grid";
Expand Down Expand Up @@ -176,8 +177,9 @@ const TokenGated = ({
</LockInfoDesc>
<LockInfoDesc>
<a
href={openseaLinkToOriginalMainnetCollection}
href={sanitizeUrl(openseaLinkToOriginalMainnetCollection)}
target="_blank"
rel="noopener noreferrer"
>
{openseaLinkToOriginalMainnetCollection}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import copyToClipboard from "../../../lib/utils/copyToClipboard";
import { getDateTimestamp } from "../../../lib/utils/getDateTimestamp";
import { Disputes } from "../../../lib/utils/hooks/useExchanges";
import { useKeepQueryParamsNavigate } from "../../../lib/utils/hooks/useKeepQueryParamsNavigate";
import { sanitizeUrl } from "../../../lib/utils/url";
import { useModal } from "../../modal/useModal";
import Price from "../../price";
import PaginationPages from "../../seller/common/PaginationPages";
Expand Down Expand Up @@ -175,7 +176,7 @@ export default function DisputesTable({ disputes }: Props) {
whiteSpace: "pre"
}}
onClick={() => {
copyToClipboard(emailAddress).then(() => {
copyToClipboard(sanitizeUrl(emailAddress)).then(() => {
toast(() => "Seller e-mail has been copied to clipboard");
});
}}
Expand Down
8 changes: 5 additions & 3 deletions src/components/footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import logo from "../../../src/assets/logo-white.svg";
import { BosonRoutes } from "../../lib/routing/routes";
import { breakpoint } from "../../lib/styles/breakpoint";
import { useBreakpoints } from "../../lib/utils/hooks/useBreakpoints";
import { sanitizeUrl } from "../../lib/utils/url";
import SocialLogo, {
SocialLogoValues
} from "../../pages/custom-store/SocialLogo";
Expand Down Expand Up @@ -112,9 +113,9 @@ function Socials() {
return socialMediaLinks.map(({ url, value }) => {
return (
<a
href={url}
href={sanitizeUrl(url)}
target="_blank"
rel="noopener"
rel="noopener noreferrer"
key={`social_nav_${value}_${url}`}
>
<SocialLogo logo={value} />
Expand Down Expand Up @@ -241,9 +242,10 @@ export default function FooterComponent() {
return (
<a
key={`${footerLink.label}-${footerLink.value}-${index}`}
href={footerLink.value}
href={sanitizeUrl(footerLink.value)}
target="_blank"
style={{ textAlign: "center" }}
rel="noopener noreferrer"
>
{footerLink.label}
</a>
Expand Down
3 changes: 2 additions & 1 deletion src/components/toasts/SuccessTransactionToast.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Toast } from "react-hot-toast";

import { colors } from "../../lib/styles/colors";
import { sanitizeUrl } from "../../lib/utils/url";
import Grid from "../ui/Grid";
import Typography from "../ui/Typography";
import SuccessToast from "./common/SuccessToast";
Expand Down Expand Up @@ -33,7 +34,7 @@ export default function SuccessTransactionToast({
View details
</Typography>
) : url ? (
<a href={url} target="_blank">
<a href={sanitizeUrl(url)} target="_blank" rel="noopener noreferrer">
<Typography color={colors.secondary}>View details</Typography>
</a>
) : null}
Expand Down
9 changes: 8 additions & 1 deletion src/lib/styles/GlobalStyle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { createGlobalStyle } from "styled-components";

import barlowRegular from "../../assets/fonts/Barlow-Regular.ttf";
import neuropolitical_rg from "../../assets/fonts/neuropolitical_rg.ttf";
import { breakpoint } from "../../lib/styles/breakpoint";
import { colors } from "../../lib/styles/colors";

Expand All @@ -19,7 +21,12 @@ const GlobalStyle = createGlobalStyle<{
}>`
@font-face {
font-family: barlow;
src: url(src/assets/fonts/Barlow-Regular.ttf);
src: url(${barlowRegular});
font-weight: normal;
}
@font-face {
font-family: neuropolitical_rg;
src: url(${neuropolitical_rg});
font-weight: normal;
}
* {
Expand Down
2 changes: 2 additions & 0 deletions src/lib/types/externals.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
declare module "@metamask/jazzicon";

declare module "pretty";

declare module "*.ttf";
4 changes: 4 additions & 0 deletions src/pages/custom-store/store-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ export const formModel = {
{
label: "Barlow",
value: "barlow" // defined in src/lib/styles/GlobalStyle.tsx
},
{
label: "Neuropolitical",
value: "neuropolitical_rg" // defined in src/lib/styles/GlobalStyle.tsx
}
]
},
Expand Down
10 changes: 8 additions & 2 deletions src/pages/profile/seller/SellerSocial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Profile,
ProfileFieldsFragment
} from "../../../lib/utils/hooks/lens/graphql/generated";
import { sanitizeUrl } from "../../../lib/utils/url";
import { preAppendHttps } from "../../../lib/validation/regex/url";
import {
DetailShareWrapper,
Expand All @@ -26,7 +27,12 @@ function RenderSocial({
icon: Icon
}: RenderSocialProps) {
return (
<SocialIcon href={href} $isDisabled={disabled} target="_blank">
<SocialIcon
href={href}
$isDisabled={disabled}
target="_blank"
rel="noopener noreferrer"
>
{Icon ? Icon : <Globe size={24} />}
</SocialIcon>
);
Expand Down Expand Up @@ -60,7 +66,7 @@ export default function SellerSocial({
{/* TODO: Removed as we don't have discord in lens profile */}
{/* <RenderSocial icon={DiscordLogo} href={""} /> */}
{lensUrl !== false && (
<RenderSocial icon={<Globe size={24} />} href={lensUrl} />
<RenderSocial icon={<Globe size={24} />} href={sanitizeUrl(lensUrl)} />
)}
<DetailShareWrapper>
<DetailShare />
Expand Down