From 3e4df53381293d6efe37d06d4d1c5798b2cebe8b Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 2 Mar 2020 10:58:11 +0300 Subject: [PATCH] fix env hashtag --- .env.example | 2 +- nuxt.config.js | 3 +++ server/attestationWatcher.js | 4 ++-- store/user.js | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 4e6c925..05ffb51 100644 --- a/.env.example +++ b/.env.example @@ -13,7 +13,7 @@ TWITTER_CALLBACK_URL=https://ceremony.tornado.cash/api/oauth_callback/twitter TWITTER_ACCESS_TOKEN_KEY= TWITTER_ACCESS_TOKEN_SECRET= # hashtag should be provided without # sign -NUXT_ENV_TWITTER_HASHTAG= +TWITTER_HASHTAG= TWITTER_INTERVAL_ATTESTATION=300000 GITHUB_CLIEND_ID= diff --git a/nuxt.config.js b/nuxt.config.js index 575af92..30ee6bf 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -123,5 +123,8 @@ module.exports = { server: { port: 3000, // default: 3000 host: '0.0.0.0' // default: localhost + }, + env: { + hashtag: process.env.TWITTER_HASHTAG } } diff --git a/server/attestationWatcher.js b/server/attestationWatcher.js index 27f668f..ccdbdec 100644 --- a/server/attestationWatcher.js +++ b/server/attestationWatcher.js @@ -6,7 +6,7 @@ const { TWITTER_CONSUMER_SECRET, TWITTER_ACCESS_TOKEN_KEY, TWITTER_ACCESS_TOKEN_SECRET, - NUXT_ENV_TWITTER_HASHTAG, + TWITTER_HASHTAG, TWITTER_INTERVAL_ATTESTATION, NODE_ENV } = process.env @@ -31,7 +31,7 @@ function attestationWatcher() { const params = { since_id: initTweet, - q: `#${NUXT_ENV_TWITTER_HASHTAG} -filter:retweets`, + q: `#${TWITTER_HASHTAG} -filter:retweets`, result_type: 'recent', count: 100 } diff --git a/store/user.js b/store/user.js index a0dfb88..d29a50c 100644 --- a/store/user.js +++ b/store/user.js @@ -53,7 +53,7 @@ const actions = { window.location.replace(`/api/connect/${provider}`) }, makeTweet({ state }) { - const tweetText = `Just made the contribution %23${state.contributionIndex} to @TornadoCash Trusted Setup Ceremony! 🚀 %23${process.env.NUXT_ENV_TWITTER_HASHTAG}` + const tweetText = `Just made the contribution %23${state.contributionIndex} to @TornadoCash Trusted Setup Ceremony! 🚀 %23${process.env.hashtag}` const popUpWindowWidth = 600 const popUpWindowHeight = 250 const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX