Skip to content

Commit

Permalink
chore: update paddle details (#4651)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigint authored Feb 15, 2024
2 parents 658ddc8 + b31e0ea commit a216607
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apps/web/src/components/Shared/Auth/Signup/ChooseHandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import {
APP_NAME,
HANDLE_PREFIX,
HEY_LENS_SIGNUP,
IS_MAINNET,
PADDLE_CLIENT_TOKEN,
PADDLE_PRICE_ID,
SIGNUP_PRICE,
ZERO_ADDRESS
} from '@hey/data/constants';
Expand Down Expand Up @@ -97,7 +100,7 @@ const ChooseHandle: FC = () => {

const handleBuy = async () => {
const paddle = await initializePaddle({
environment: 'sandbox',
environment: IS_MAINNET ? 'production' : 'sandbox',
eventCallback: (data) => {
if (data.data?.status !== 'ready') {
Leafwatch.track(AUTH.SIGNUP, { price: SIGNUP_PRICE, via: 'paddle' });
Expand All @@ -106,7 +109,7 @@ const ChooseHandle: FC = () => {
setScreen('minting');
}
},
token: 'test_973fcd0216c56384cf67b1ba367'
token: PADDLE_CLIENT_TOKEN
});

if (!paddle) {
Expand All @@ -115,7 +118,7 @@ const ChooseHandle: FC = () => {

paddle.Checkout.open({
customData: { address: address as string, delegatedExecutor, handle },
items: [{ priceId: 'pri_01hpmkr0e823sdj4jkzx78tq75', quantity: 1 }]
items: [{ priceId: PADDLE_PRICE_ID, quantity: 1 }]
});
};

Expand Down
8 changes: 8 additions & 0 deletions packages/data/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ export const LIVEPEER_KEY = '70508bf8-2e16-4594-852d-5aed798f6403';
export const ALCHEMY_API_KEY = 'Xx-4a1SyWtS9U4h0cEuRmvgYtGeVOlv7';
export const THIRDWEB_CLIENT_ID = '0e8fa22aa33b3da60c593b4864a2e2d1';

// Paddle
export const PADDLE_CLIENT_TOKEN = IS_MAINNET
? 'live_58c979f347c0f234f18bb64415c'
: 'test_973fcd0216c56384cf67b1ba367';
export const PADDLE_PRICE_ID = IS_MAINNET
? 'pri_01hpmkcjpea4v7ejb67qycsm2r'
: 'pri_01hpmkr0e823sdj4jkzx78tq75';

// Named transforms for ImageKit
export const AVATAR = 'tr:w-250,h-250';
export const EXPANDED_AVATAR = 'tr:w-1000,h-1000';
Expand Down

1 comment on commit a216607

@vercel
Copy link

@vercel vercel bot commented on a216607 Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

web – ./apps/web

web-heyxyz.vercel.app
heyxyz.vercel.app
web-git-main-heyxyz.vercel.app
hey.xyz

Please sign in to comment.