From 8a28efaa48f8b80fa9ad1b68af1b008356596716 Mon Sep 17 00:00:00 2001 From: robin Date: Fri, 5 Apr 2024 15:27:50 -0400 Subject: [PATCH] Remove mint.fun button from mobile (#2405) * toss mint.fun * toss --- apps/mobile/src/components/MintLinkButton.tsx | 6 ------ apps/web/src/components/MintLinkButton.tsx | 6 ------ .../src/utils/getMintUrlWithReferrer.test.ts | 19 ------------------- .../src/utils/getMintUrlWithReferrer.ts | 1 - 4 files changed, 32 deletions(-) diff --git a/apps/mobile/src/components/MintLinkButton.tsx b/apps/mobile/src/components/MintLinkButton.tsx index 3fd14a6413..1424c3e093 100644 --- a/apps/mobile/src/components/MintLinkButton.tsx +++ b/apps/mobile/src/components/MintLinkButton.tsx @@ -6,7 +6,6 @@ import { EnsembleIcon } from 'src/icons/EnsembleIcon'; import { FoundationIcon } from 'src/icons/FoundationIcon'; import { FxHashIcon } from 'src/icons/FxHashIcon'; import { HighlightIcon } from 'src/icons/HighlightIcon'; -import { MintFunIcon } from 'src/icons/MintFunIcon'; import { ProhibitionIcon } from 'src/icons/ProhibitionIcon'; import { SuperRareIcon } from 'src/icons/SuperRareIcon'; import { TopRightArrowIcon } from 'src/icons/TopRightArrowIcon'; @@ -93,11 +92,6 @@ export function MintLinkButton({ buttonText: 'mint on zora', icon: , }; - } else if (mintProviderType === 'MintFun') { - return { - buttonText: 'mint on mint.fun', - icon: , - }; } else if (mintProviderType === 'FxHash') { return { buttonText: 'mint on fxhash', diff --git a/apps/web/src/components/MintLinkButton.tsx b/apps/web/src/components/MintLinkButton.tsx index 2094f55871..26b828d813 100644 --- a/apps/web/src/components/MintLinkButton.tsx +++ b/apps/web/src/components/MintLinkButton.tsx @@ -7,7 +7,6 @@ import { EnsembleLogoIcon } from '~/icons/EnsembleLogoIcon'; import { FoundationLogoIcon } from '~/icons/FoundationLogoIcon'; import { FxHashLogoIcon } from '~/icons/FxHashLogoIcon'; import { HighlightLogoIcon } from '~/icons/HighlightLogoIcon'; -import { MintFunLogoIcon } from '~/icons/MintFunLogoIcon'; import { ProhibitionLogoIcon } from '~/icons/ProhibitionLogoIcon'; import { SuperRareLogoIcon } from '~/icons/SuperRareLogoIcon'; import { ZoraLogoIcon } from '~/icons/ZoraLogoIcon'; @@ -71,11 +70,6 @@ export function MintLinkButton({ buttonText: 'mint on zora', icon: , }; - } else if (mintProviderType === 'MintFun') { - return { - buttonText: 'mint on mint.fun', - icon: , - }; } else if (mintProviderType === 'FxHash') { return { buttonText: 'mint on fxhash', diff --git a/packages/shared/src/utils/getMintUrlWithReferrer.test.ts b/packages/shared/src/utils/getMintUrlWithReferrer.test.ts index 9898a11546..2fec594579 100644 --- a/packages/shared/src/utils/getMintUrlWithReferrer.test.ts +++ b/packages/shared/src/utils/getMintUrlWithReferrer.test.ts @@ -1,14 +1,6 @@ import { getMintUrlWithReferrer } from './getMintUrlWithReferrer'; describe('getMintUrlWithReferrer', () => { - it('should append referrer to mint.fun URLs', () => { - const url = 'https://mint.fun/op/12345'; - const referrer = 'referrer1'; - const result = getMintUrlWithReferrer(url, referrer); - expect(result.url).toBe('https://mint.fun/op/12345?ref=referrer1'); - expect(result.provider).toBe('MintFun'); - }); - it('should append referrer to zora.co URLs', () => { const url = 'https://zora.co/collect/zora:0xaa8c4286883c46ffc3225500f4955f8edc0a351f/2'; const referrer = 'referrer2'; @@ -71,17 +63,6 @@ describe('getMintUrlWithReferrer', () => { expect(result.provider).toBe('Foundation'); }); - it('should not append referrer if mint.fun already have ref', () => { - const url = - 'https://mint.fun/op/0xcA1cb17d65CeF28087Bf1f65B4D599c768F870Ac?ref=0x517AEa67196C8975dd100236689D0CA10B928F58'; - const referrer = 'newReferrer'; - const result = getMintUrlWithReferrer(url, referrer); - expect(result.url).toBe( - 'https://mint.fun/op/0xcA1cb17d65CeF28087Bf1f65B4D599c768F870Ac?ref=0x517AEa67196C8975dd100236689D0CA10B928F58' - ); - expect(result.provider).toBe('MintFun'); - }); - it('should not append referrer if zora.co already have referrer', () => { const url = 'https://zora.co/collect/zora:0x7c2668BD0D3c050703CEcC956C11Bd520c26f7d4/2?referrer=0x517AEa67196C8975dd100236689D0CA10B928F58'; diff --git a/packages/shared/src/utils/getMintUrlWithReferrer.ts b/packages/shared/src/utils/getMintUrlWithReferrer.ts index 893e424382..dd8a63d695 100644 --- a/packages/shared/src/utils/getMintUrlWithReferrer.ts +++ b/packages/shared/src/utils/getMintUrlWithReferrer.ts @@ -7,7 +7,6 @@ export const MINT_LINK_CHAIN_ENABLED = new Set([ ]); const providers = [ - { regex: '^https://(www\\.)?mint.fun/?', name: 'MintFun', param: 'ref' }, { regex: '^https://(www\\.)?zora.co/?', name: 'Zora', param: 'referrer' }, { regex: '^https://(www\\.)?fxhash.xyz/?', name: 'FxHash' }, {