updated prod secret
This commit is contained in:
@@ -25,7 +25,7 @@ export function subscribeToDonors(callback) {
|
||||
const donors = [];
|
||||
snapshot.forEach((doc) => {
|
||||
const data = doc.data();
|
||||
if (data.env === 'dev') return; // skip test donations
|
||||
if (import.meta.env.PROD && data.env === 'dev') return; // skip test donations on production
|
||||
donors.push({ id: doc.id, ...data });
|
||||
});
|
||||
callback(donors);
|
||||
|
||||
@@ -3,14 +3,24 @@ import { getAuth } from 'firebase/auth';
|
||||
import { getFirestore } from 'firebase/firestore';
|
||||
|
||||
const firebaseConfig = {
|
||||
apiKey: "AIzaSyAA7nmvia_CrPUnbong7xTF7vcoRdhXbyw",
|
||||
authDomain: "whsfund-c5e40.firebaseapp.com",
|
||||
projectId: "whsfund-c5e40",
|
||||
storageBucket: "whsfund-c5e40.firebasestorage.app",
|
||||
messagingSenderId: "395581871999",
|
||||
appId: "1:395581871999:web:919c94680146e45fd06c4a",
|
||||
apiKey: import.meta.env.VITE_FIREBASE_API_KEY,
|
||||
authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN,
|
||||
projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID,
|
||||
storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET,
|
||||
messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID,
|
||||
appId: import.meta.env.VITE_FIREBASE_APP_ID,
|
||||
};
|
||||
|
||||
const missingConfig = Object.entries(firebaseConfig)
|
||||
.filter(([, value]) => !value)
|
||||
.map(([key]) => key);
|
||||
|
||||
if (missingConfig.length > 0) {
|
||||
throw new Error(
|
||||
`Missing Firebase config for ${import.meta.env.MODE}: ${missingConfig.join(', ')}`
|
||||
);
|
||||
}
|
||||
|
||||
const app = initializeApp(firebaseConfig);
|
||||
export const auth = getAuth(app);
|
||||
export const db = getFirestore(app);
|
||||
|
||||
@@ -6,7 +6,7 @@ const pendingRef = collection(db, 'pendingDonations');
|
||||
const IS_DEV = import.meta.env.DEV;
|
||||
|
||||
const MERCHANT_HANDLE = IS_DEV
|
||||
? 'dominica-methodist-circuit-dev'
|
||||
? 'wesley-high-school'
|
||||
: 'dominica-methodist-circuit';
|
||||
|
||||
const PAYMENT_BASE_URL = IS_DEV
|
||||
|
||||
Reference in New Issue
Block a user