From 24cf63af7330481804eb0984fd403549f2729141 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 15 Nov 2023 19:44:16 +0000 Subject: [PATCH] Move all creds to the env file --- .env.example | 6 +++++- src/main.tsx | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 3d14086..919588e 100644 --- a/.env.example +++ b/.env.example @@ -4,4 +4,8 @@ VITE_API_HOST= # Get these from https://console.cloud.google.com/apis/credentials -VITE_GOOGLE_CLIENT_ID= +# Or use these for development purposes only, NOTICE: will only work on localhost:3000 +VITE_GOOGLE_CLIENT_ID=970987756660-35a6tc48hvi8cev9cnknp0iugv9poa23.apps.googleusercontent.com + +# Use this Sequence API key for development purposes only +VITE_SEQUENCE_API_KEY=eyJzZWNyZXQiOiJ0YmQiLCJ0ZW5hbnQiOjksImlkZW50aXR5UG9vbElkIjoidXMtZWFzdC0yOjQyYzlmMzlkLWM5MzUtNGQ1Yy1hODQ1LTVjODgxNWM3OWVlMyIsImVtYWlsQ2xpZW50SWQiOiI1Zmw3ZGc3bXZ1NTM0bzl2ZmpiYzZoajMxcCIsImlkcFJlZ2lvbiI6InVzLWVhc3QtMjo0MmM5ZjM5ZC1jOTM1LTRkNWMtYTg0NS01Yzg4MTVjNzllZTMifQ== \ No newline at end of file diff --git a/src/main.tsx b/src/main.tsx index 1919d99..61c4495 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -11,13 +11,15 @@ import App from './App.tsx' import { ethers } from 'ethers' import { defaults } from '@0xsequence/waas' -export const CLIENT_ID = import.meta.env.VITE_GOOGLE_CLIENT_ID +const GOOGLE_CLIENT_ID = import.meta.env.VITE_GOOGLE_CLIENT_ID +const SEQUENCE_API_KEY = import.meta.env.VITE_SEQUENCE_API_KEY export const node = new ethers.providers.JsonRpcProvider('https://nodes.sequence.app/polygon') export const sequence = new Sequence({ network: 'polygon', - key: 'eyJzZWNyZXQiOiJ0YmQiLCJ0ZW5hbnQiOjksImlkZW50aXR5UG9vbElkIjoidXMtZWFzdC0yOjQyYzlmMzlkLWM5MzUtNGQ1Yy1hODQ1LTVjODgxNWM3OWVlMyIsImVtYWlsQ2xpZW50SWQiOiI1Zmw3ZGc3bXZ1NTM0bzl2ZmpiYzZoajMxcCJ9', + key: SEQUENCE_API_KEY, + idpRegion: 'us-west-2' }, defaults.TEMPLATE_NEXT) export const router = createHashRouter([ @@ -34,7 +36,7 @@ export const router = createHashRouter([ ReactDOM.createRoot(document.getElementById('root')!).render( - +