Skip to content

Commit 23ab7cb

Browse files
AmarTrebinjacclaude
andcommitted
feat(wallet): remove core withdrawal feature from frontend
Remove all user-facing references to the core withdrawal feature: - Remove withdrawLink constant from constants.ts - Remove minCoresEarningsThreshold constant from transaction.tsx - Remove withdrawal FAQ item from common.tsx - Remove "Earn with daily.dev" section from wallet page including: - Earnings progress indicator and progress bar - Withdraw button - Related imports (ProgressBar, formatCurrency, anchorDefaultRel, etc.) The backend infrastructure in njord remains intact but is no longer accessible through the UI as this feature is being deprecated. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent a86f06d commit 23ab7cb

File tree

4 files changed

+1
-90
lines changed

4 files changed

+1
-90
lines changed

packages/shared/src/components/cores/common.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ export const coresFAQItems: FAQItem[] = [
3131
description:
3232
'Cores are non-refundable once purchased. Please double-check your selected bundle before completing the transaction. If you run into any issues, you can always reach out to [email protected] and we’ll do our best to help.',
3333
},
34-
{
35-
title: 'Can I convert Cores into real money?',
36-
description:
37-
'We’re currently experimenting with monetization. In some cases, eligible users may request withdrawals once they meet minimum thresholds. This feature may require identity verification, isn’t available in all countries, and is subject to platform policies and changes.',
38-
},
3934
{
4035
title: 'Are Cores included in the daily.dev Plus subscription?',
4136
description:

packages/shared/src/lib/constants.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ export const DeletedPostId = '404';
167167
export const BROADCAST_CHANNEL_NAME = 'dailydev_broadcast';
168168
export const broadcastChannel = new BroadcastChannel(BROADCAST_CHANNEL_NAME);
169169

170-
export const withdrawLink = 'https://r.daily.dev/withdraw';
171-
172170
export const coresDocsLink = 'https://r.daily.dev/cores';
173171

174172
export const webFunnelPrefix = '/helloworld';

packages/shared/src/lib/transaction.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,4 @@ export const getTransactionLabel = ({
8787
return type.toUpperCase();
8888
};
8989

90-
export const minCoresEarningsThreshold = 100_000;
91-
9290
export const coreApproxValueUSD = 100;

packages/webapp/pages/wallet.tsx

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ import {
1010
} from '@dailydotdev/shared/src/components/buttons/Button';
1111
import {
1212
Typography,
13-
TypographyColor,
1413
TypographyType,
1514
} from '@dailydotdev/shared/src/components/typography/Typography';
1615
import {
1716
coresDocsLink,
1817
creatorsTermsOfService,
1918
onboardingUrl,
2019
webappUrl,
21-
withdrawLink,
2220
} from '@dailydotdev/shared/src/lib/constants';
2321
import {
2422
CoreIcon,
@@ -34,22 +32,15 @@ import { WidgetContainer } from '@dailydotdev/shared/src/components/widgets/comm
3432
import { IconSize } from '@dailydotdev/shared/src/components/Icon';
3533
import classNames from 'classnames';
3634
import classed from '@dailydotdev/shared/src/lib/classed';
37-
import { ProgressBar } from '@dailydotdev/shared/src/components/fields/ProgressBar';
3835

3936
import { LogEvent, Origin } from '@dailydotdev/shared/src/lib/log';
4037
import { useLogContext } from '@dailydotdev/shared/src/contexts/LogContext';
4138
import { useAuthContext } from '@dailydotdev/shared/src/contexts/AuthContext';
42-
import {
43-
formatCoresCurrency,
44-
formatCurrency,
45-
} from '@dailydotdev/shared/src/lib/utils';
39+
import { formatCoresCurrency } from '@dailydotdev/shared/src/lib/utils';
4640
import {
4741
getTransactionType,
4842
getTransactionLabel,
49-
coreApproxValueUSD,
50-
minCoresEarningsThreshold,
5143
} from '@dailydotdev/shared/src/lib/transaction';
52-
import { anchorDefaultRel } from '@dailydotdev/shared/src/lib/strings';
5344
import { useInfiniteQuery, useQuery } from '@tanstack/react-query';
5445
import {
5546
generateQueryKey,
@@ -192,10 +183,6 @@ const Wallet = (): ReactElement => {
192183
return null;
193184
}
194185

195-
const earningsProgressPercentage =
196-
user.balance.amount / (minCoresEarningsThreshold / 100);
197-
const coresValueUSD = minCoresEarningsThreshold / coreApproxValueUSD;
198-
199186
return (
200187
<ProtectedPage>
201188
<div className="m-auto flex w-full max-w-screen-laptop flex-col pb-12 tablet:pb-0 laptop:min-h-page laptop:flex-row laptop:border-l laptop:border-r laptop:border-border-subtlest-tertiary laptop:pb-6 laptopL:pb-0">
@@ -261,73 +248,6 @@ const Wallet = (): ReactElement => {
261248
/>
262249
</section>
263250
<Divider />
264-
<section className="flex w-full flex-col gap-6">
265-
<div className="flex flex-col gap-1">
266-
<Typography type={TypographyType.Body}>
267-
<strong>Earn with daily.dev</strong> (beta)
268-
</Typography>
269-
<Typography
270-
type={TypographyType.Callout}
271-
color={TypographyColor.Tertiary}
272-
>
273-
Earn income by engaging with the daily.dev community,
274-
contributing valuable content, and receiving Cores from
275-
others. Once you reach{' '}
276-
{formatCurrency(minCoresEarningsThreshold, {
277-
minimumFractionDigits: 0,
278-
})}{' '}
279-
Cores, you can request a withdrawal. Monetization is still in
280-
beta, so additional eligibility steps and requirements may
281-
apply.
282-
</Typography>
283-
</div>
284-
<div className="flex gap-2">
285-
<CoreIcon />
286-
<div className="flex flex-1 flex-col gap-1.5">
287-
<ProgressBar
288-
shouldShowBg
289-
percentage={earningsProgressPercentage}
290-
className={{
291-
wrapper: 'h-2 rounded-8',
292-
bar: 'h-full rounded-8',
293-
barColor: 'bg-accent-bun-default',
294-
}}
295-
/>
296-
<Typography type={TypographyType.Callout}>
297-
{formatCurrency(user.balance.amount, {
298-
minimumFractionDigits: 0,
299-
})}{' '}
300-
/{' '}
301-
<strong>
302-
{formatCurrency(minCoresEarningsThreshold, {
303-
minimumFractionDigits: 0,
304-
})}
305-
</strong>{' '}
306-
Cores (≈ USD $
307-
{formatCurrency(coresValueUSD, {
308-
minimumFractionDigits: 0,
309-
})}
310-
)
311-
</Typography>
312-
</div>
313-
</div>
314-
<Button
315-
tag="a"
316-
variant={
317-
earningsProgressPercentage < 100
318-
? ButtonVariant.Secondary
319-
: ButtonVariant.Primary
320-
}
321-
className="mr-auto"
322-
disabled={earningsProgressPercentage < 100}
323-
href={withdrawLink}
324-
target="_blank"
325-
rel={anchorDefaultRel}
326-
>
327-
Withdraw
328-
</Button>
329-
</section>
330-
<Divider />
331251
<section className="flex w-full flex-col gap-6">
332252
<Typography type={TypographyType.Body} bold>
333253
Transaction history

0 commit comments

Comments
 (0)