diff --git a/.env.defaults b/.env.defaults index bfeb12fff..5274f8c68 100644 --- a/.env.defaults +++ b/.env.defaults @@ -19,7 +19,7 @@ THUMBNAIL_CDN_URL=https://image-processor.vanwanet.com/optimize/ WELCOME_VERSION=1.0 # STRIPE -STRIPE_PUBLIC_KEY='pk_test_NoL1JWL7i1ipfhVId5KfDZgo' +# STRIPE_PUBLIC_KEY='pk_test_NoL1JWL7i1ipfhVId5KfDZgo' # Analytics MATOMO_URL=https://analytics.lbry.com/ diff --git a/static/app-strings.json b/static/app-strings.json index e5f45808b..a7e83a936 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -2090,5 +2090,8 @@ "Expand Comments": "Expand Comments", "Expand": "Expand", "Load More": "Load More", + "Collection": "Collection", + "%channelName% isn't live right now, but the chat is! Check back later to watch the stream.": "%channelName% isn't live right now, but the chat is! Check back later to watch the stream.", + "Review": "Review", "--end--": "--end--" } diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index 008a28aa1..63e77a026 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -1,6 +1,6 @@ // @flow import type { ElementRef } from 'react'; -import { SIMPLE_SITE, STRIPE_PUBLIC_KEY } from 'config'; +import { SIMPLE_SITE } from 'config'; import * as PAGES from 'constants/pages'; import * as ICONS from 'constants/icons'; import React from 'react'; @@ -21,12 +21,8 @@ import Empty from 'component/common/empty'; import { getChannelIdFromClaim } from 'util/claim'; import { Lbryio } from 'lbryinc'; -let stripeEnvironment = 'test'; -// if the key contains pk_live it's a live key -// update the environment for the calls to the backend to indicate which environment to hit -if (STRIPE_PUBLIC_KEY.indexOf('pk_live') > -1) { - stripeEnvironment = 'live'; -} +import { getStripeEnvironment } from 'util/stripe'; +let stripeEnvironment = getStripeEnvironment(); const TAB_FIAT = 'TabFiat'; const TAB_LBC = 'TabLBC'; @@ -245,10 +241,13 @@ export function CommentCreate(props: Props) { }, 1500); doToast({ - message: __("You sent %tipAmount% LBRY Credits as a tip to %tipChannelName%, I'm sure they appreciate it!", { - tipAmount: tipAmount, // force show decimal places - tipChannelName, - }), + message: __( + "You sent %tipAmount% LBRY Credits as a tip to %tipChannelName%, I'm sure they appreciate it!", + { + tipAmount: tipAmount, // force show decimal places + tipChannelName, + } + ), }); setSuccessTip({ txid, tipAmount }); @@ -265,7 +264,8 @@ export function CommentCreate(props: Props) { Lbryio.call( 'customer', 'tip', - { // round to deal with floating point precision + { + // round to deal with floating point precision amount: Math.round(100 * roundedAmount), // convert from dollars to cents creator_channel_name: tipChannelName, // creator_channel_name creator_channel_claim_id: channelClaimId, @@ -387,12 +387,7 @@ export function CommentCreate(props: Props) { } }} > - +
@@ -534,7 +529,8 @@ export function CommentCreate(props: Props) { }} /> )} - {!claimIsMine && ( + {/* @if TARGET='web' */} + {!claimIsMine && stripeEnvironment && (