Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PAY-2244] Add envs for coinflow (web) #6881

Merged
merged 2 commits into from
Dec 7, 2023
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
71 changes: 33 additions & 38 deletions package-lock.json

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

1 change: 0 additions & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"@audius/fixed-decimal": "*",
"@audius/sdk": "*",
"@audius/trpc-server": "*",
"@coinflowlabs/react": "2.7.0",
"@fingerprintjs/fingerprintjs-pro": "3.5.6",
"@jup-ag/api": "6.0.6",
"@metaplex-foundation/mpl-token-metadata": "2.5.2",
Expand Down
4 changes: 3 additions & 1 deletion packages/web/.env/.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@ VITE_STRIPE_CLIENT_PUBLISHABLE_KEY=
# Stage optimizely key
VITE_OPTIMIZELY_KEY=MX4fYBgANQetvmBXGpuxzF

VITE_USE_HASH_ROUTING=false
VITE_USE_HASH_ROUTING=false

VITE_COINFLOW_MERCHANT_ID=audius
4 changes: 3 additions & 1 deletion packages/web/.env/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ VITE_OTEL_TRACING_ENABLED=true

VITE_STRIPE_CLIENT_PUBLISHABLE_KEY=pk_live_51LPsGuCJOWtpH6AEKshlCs3L8QhAfevNvhev8K9a0u92O5ku83KRjLIqCdxgf3NhitdtmMGlw0Wjf33NjZJjZUBz006A3IoSiQ

VITE_USE_HASH_ROUTING=false
VITE_USE_HASH_ROUTING=false

VITE_COINFLOW_MERCHANT_ID=tikilabs
4 changes: 3 additions & 1 deletion packages/web/.env/.env.stage
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,6 @@ VITE_OTEL_TRACING_ENABLED=true

VITE_STRIPE_CLIENT_PUBLISHABLE_KEY=pk_test_51LPsGuCJOWtpH6AEZT3Wf2U2xmLZQrEV56yha7HEVTEyhYYVrWCdknml3t4gkSe9Nagd1o9Royy8zL3XEAmRzeHS00xAKTfgpi

VITE_USE_HASH_ROUTING=false
VITE_USE_HASH_ROUTING=false

VITE_COINFLOW_MERCHANT_ID=audius
1 change: 1 addition & 0 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@audius/stems": "*",
"@audius/trpc-server": "*",
"@coinbase/cbpay-js": "1.2.0",
"@coinflowlabs/react": "2.7.0",
"@emotion/css": "^11.11.2",
"@emotion/styled": "^11.11.0",
"@fingerprintjs/fingerprintjs-pro": "3.5.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import ModalDrawer from 'pages/audio-rewards-page/components/modals/ModalDrawer'

import styles from './CoinflowOnrampModal.module.css'

const MERCHANT_ID = 'audius'
const MERCHANT_ID = process.env.VITE_COINFLOW_MERCHANT_ID
const IS_PRODUCTION = process.env.VITE_ENVIRONMENT === 'production'

type CoinflowAdapter = {
wallet: CoinflowSolanaPurchaseProps['wallet']
Expand Down Expand Up @@ -103,7 +104,7 @@ export const CoinflowOnrampModal = () => {
wallet={adapter.wallet}
connection={adapter.connection}
merchantId={MERCHANT_ID}
env='sandbox'
env={IS_PRODUCTION ? 'prod' : 'sandbox'}
blockchain='solana'
amount={amount}
/>
Expand Down