fix: Use env variable for paypal donations
This commit is contained in:
committed by
mrugesh mohapatra
parent
6475eadf82
commit
8870a063e4
@ -192,7 +192,8 @@ exports.onCreateWebpackConfig = ({ stage, rules, plugins, actions }) => {
|
|||||||
),
|
),
|
||||||
STRIPE_PUBLIC_KEY: JSON.stringify(process.env.STRIPE_PUBLIC_KEY || ''),
|
STRIPE_PUBLIC_KEY: JSON.stringify(process.env.STRIPE_PUBLIC_KEY || ''),
|
||||||
ROLLBAR_CLIENT_ID: JSON.stringify(process.env.ROLLBAR_CLIENT_ID || ''),
|
ROLLBAR_CLIENT_ID: JSON.stringify(process.env.ROLLBAR_CLIENT_ID || ''),
|
||||||
ENVIRONMENT: JSON.stringify(process.env.NODE_ENV || 'development')
|
ENVIRONMENT: JSON.stringify(process.env.NODE_ENV || 'development'),
|
||||||
|
PAYPAL_SUPPORTERS: JSON.stringify(process.env.PAYPAL_SUPPORTERS || 404)
|
||||||
}),
|
}),
|
||||||
new RmServiceWorkerPlugin()
|
new RmServiceWorkerPlugin()
|
||||||
]
|
]
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* global PAYPAL_SUPPORTERS */
|
||||||
import { createAction, handleActions } from 'redux-actions';
|
import { createAction, handleActions } from 'redux-actions';
|
||||||
import { uniqBy } from 'lodash';
|
import { uniqBy } from 'lodash';
|
||||||
|
|
||||||
@ -161,10 +162,8 @@ export const userSelector = state => {
|
|||||||
|
|
||||||
export const sessionMetaSelector = state => state[ns].sessionMeta;
|
export const sessionMetaSelector = state => state[ns].sessionMeta;
|
||||||
export const activeDonationsSelector = state =>
|
export const activeDonationsSelector = state =>
|
||||||
// this default is mostly for development where there are likely no donators
|
Number(sessionMetaSelector(state).activeDonations) +
|
||||||
// in the local db
|
Number(PAYPAL_SUPPORTERS);
|
||||||
// If we see this in production then things are getting weird
|
|
||||||
sessionMetaSelector(state).activeDonations || 4040;
|
|
||||||
|
|
||||||
function spreadThePayloadOnUser(state, payload) {
|
function spreadThePayloadOnUser(state, payload) {
|
||||||
return {
|
return {
|
||||||
|
@ -15,6 +15,8 @@ JWT_SECRET='a very long secret'
|
|||||||
STRIPE_PUBLIC=pk_from_stipe_dashboard
|
STRIPE_PUBLIC=pk_from_stipe_dashboard
|
||||||
STRIPE_SECRET=sk_from_stipe_dashboard
|
STRIPE_SECRET=sk_from_stipe_dashboard
|
||||||
|
|
||||||
|
PAYPAL_SUPPORTERS=1703
|
||||||
|
|
||||||
LOCAL_AUTH=true
|
LOCAL_AUTH=true
|
||||||
PEER=stuff
|
PEER=stuff
|
||||||
DEBUG=true
|
DEBUG=true
|
||||||
|
Reference in New Issue
Block a user