From 277c25060f6a1341f155b9e0a75b959efc210143 Mon Sep 17 00:00:00 2001 From: ITurres Date: Mon, 23 Feb 2026 14:03:24 -0300 Subject: [PATCH 1/3] feat(studio/releases): Adjust end sale copy under 'webStudioDisableDistributionAndSales' flag Unify End Sale dialog messaging when sales are disabled. Keep sold-out vs active copy for default behavior. --- .../releases/MarketplaceTab/ActiveSale.tsx | 5 +- .../releases/MarketplaceTab/EndSaleModal.tsx | 36 ++++++--- .../MarketplaceTab/SaleEndPending.tsx | 73 +++++++++++++------ 3 files changed, 77 insertions(+), 37 deletions(-) diff --git a/apps/studio/src/pages/home/releases/MarketplaceTab/ActiveSale.tsx b/apps/studio/src/pages/home/releases/MarketplaceTab/ActiveSale.tsx index febdde1dc..390d4aa0c 100644 --- a/apps/studio/src/pages/home/releases/MarketplaceTab/ActiveSale.tsx +++ b/apps/studio/src/pages/home/releases/MarketplaceTab/ActiveSale.tsx @@ -88,8 +88,8 @@ export const ActiveSale: FunctionComponent = ({ sale }) => { { webStudioDisableDistributionAndSales && ( - Please end the sale and we'll return the unsold Stream Tokens - to your wallet. + Please end the sale and we'll move any earnings and unsold + Stream Tokens to your wallet. ) } @@ -145,6 +145,7 @@ export const ActiveSale: FunctionComponent = ({ sale }) => { ) } + setIsEndSaleModalOpen(false) } handleEndSale={ handleEndSale } diff --git a/apps/studio/src/pages/home/releases/MarketplaceTab/EndSaleModal.tsx b/apps/studio/src/pages/home/releases/MarketplaceTab/EndSaleModal.tsx index b177fcc74..b630f9116 100644 --- a/apps/studio/src/pages/home/releases/MarketplaceTab/EndSaleModal.tsx +++ b/apps/studio/src/pages/home/releases/MarketplaceTab/EndSaleModal.tsx @@ -1,5 +1,8 @@ import { FunctionComponent } from "react"; +import { useFlags } from "launchdarkly-react-client-sdk"; + import { Box, Stack, Typography } from "@mui/material"; + import { Button, Modal } from "@newm-web/elements"; import theme from "@newm-web/theme"; @@ -18,6 +21,8 @@ export const EndSaleModal: FunctionComponent = ({ isLoading, isSoldOut = false, }) => { + const { webStudioDisableDistributionAndSales } = useFlags(); + return ( = ({ Are you sure you want to end your stream token sale? - { isSoldOut ? ( - - All earnings from your sold out stream token sale will be moved - to your wallet. - - ) : ( - - The sale will be removed from the Marketplace, and all unsold - stream tokens will be returned to the wallet used when creating - the sale. - - ) } + + { webStudioDisableDistributionAndSales ? ( + <> + The sale will be removed from the Marketplace. All earnings + and and any unsold stream tokens will be moved to your wallet. + + ) : isSoldOut ? ( + <> + All earnings from your sold out stream token sale will be + moved to your wallet. + + ) : ( + <> + The sale will be removed from the Marketplace, and all unsold + stream tokens will be returned to the wallet used when + creating the sale. + + ) } +