Skip to content

Commit

Permalink
Chore: Prod Release
Browse files Browse the repository at this point in the history
fix: env vars not loading correctly

Merge branch 'staging' of github.com:GoodDollar/GoodProtocolUI into production
  • Loading branch information
L03TJ3 committed Nov 22, 2023
2 parents b4f77e0 + 6cc3e7c commit c3e7550
Show file tree
Hide file tree
Showing 50 changed files with 170 additions and 155 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
},
"dependencies": {
"@babel/runtime": "^7.18.9",
"@gooddollar/good-design": "^0.1.17",
"@gooddollar/good-design": "^0.1.18",
"@gooddollar/goodprotocol": "^2.0.22",
"@gooddollar/web3sdk": "^0.1.25",
"@gooddollar/web3sdk-v2": "^0.2.8",
Expand All @@ -226,6 +226,7 @@
"@web3-onboard/walletconnect": "^2.4.7",
"@web3-onboard/walletlink": "^2.1.7",
"amplitude-js": "^8.21.2",
"dotenv": "^16.3.1",
"ethers": "^5.7.2",
"mobile-device-detect": "^0.4.3",
"native-base": "3.4.11",
Expand Down
2 changes: 1 addition & 1 deletion src/components/NetworkModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function NetworkModal(): JSX.Element | null {
const networkLabel: string | null = error ? null : (NETWORK_LABEL as any)[chainId]
const network = getEnv()
// eslint-disable-next-line react-hooks/exhaustive-deps
const prodNetworks = process.env.REACT_APP_CELO_PHASE_1
const prodNetworks = import.meta.env.REACT_APP_CELO_PHASE_1
? [AdditionalChainId.CELO, ChainId.MAINNET, AdditionalChainId.FUSE]
: [ChainId.MAINNET, AdditionalChainId.FUSE]

Expand Down
2 changes: 1 addition & 1 deletion src/components/NewsFeed/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { NewsFeedContext } from '@gooddollar/web3sdk-v2'
export const feedConfig = {
production: {
feedFilter: {
context: process.env.REACT_APP_FEEDCONTEXT_PROD,
context: import.meta.env.REACT_APP_FEEDCONTEXT_PROD,
tag: 'publishDapp',
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ export default function SideBar({ mobile, closeSidebar }: { mobile?: boolean; cl
{
route: '/bridge',
text: 'Bridge',
show: process.env.REACT_APP_CELO_PHASE_3,
show: import.meta.env.REACT_APP_CELO_PHASE_3,
},
{
route: '/microbridge',
text: 'Micro Bridge',
show: process.env.REACT_APP_CELO_PHASE_3,
show: import.meta.env.REACT_APP_CELO_PHASE_3,
},
{
route: '/dashboard',
Expand Down
4 changes: 2 additions & 2 deletions src/components/gd/sushi/AsyncTokenIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const AsyncTokenIcon = ({
setLoadedSrc('')
if (!(address && chainId)) return
if (BAD_SRCS[address]) {
setLoadedSrc(`${process.env.PUBLIC_URL}/images/tokens/unknown.png`)
setLoadedSrc(`${import.meta.env.PUBLIC_URL}/images/tokens/unknown.png`)
return
}

Expand All @@ -39,7 +39,7 @@ const AsyncTokenIcon = ({
image.addEventListener('load', handleLoad)
image.onerror = () => {
BAD_SRCS[address] = true
setLoadedSrc(`${process.env.PUBLIC_URL}/images/tokens/unknown.png`)
setLoadedSrc(`${import.meta.env.PUBLIC_URL}/images/tokens/unknown.png`)
}
image.src = src
return () => {
Expand Down
7 changes: 4 additions & 3 deletions src/connectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@ export const connectOptions = {
id: '0xa4ec',
token: 'CELO',
label: 'Celo',
rpcUrl: process.env.REACT_APP_CELO_RPC ?? 'https://rpc.ankr.com/celo',
rpcUrl: import.meta.env.REACT_APP_CELO_RPC ?? 'https://rpc.ankr.com/celo',
},
{
id: '0x1',
token: 'ETH',
label: 'Ethereum Mainnet',
rpcUrl:
process.env.REACT_APP_MAINNET_RPC ?? 'https://mainnet.infura.io/v3/586298cc4e26485d9a6f9c4a5f555a22',
import.meta.env.REACT_APP_MAINNET_RPC ??
'https://mainnet.infura.io/v3/586298cc4e26485d9a6f9c4a5f555a22',
},
{
id: '0x7a',
token: 'FUSE',
label: 'Fuse Network',
rpcUrl: process.env.REACT_APP_FUSE_RPC ?? 'https://rpc.fuse.io',
rpcUrl: import.meta.env.REACT_APP_FUSE_RPC ?? 'https://rpc.fuse.io',
},
],
appMetadata: {
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/useSendAnalyticsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { useCallback } from 'react'
import { getEnv, osVersion } from 'utils/env'
import { version } from '../../package.json'

const indicativeKey = process.env.REACT_APP_INDICATIVE_KEY
const posthogKey = process.env.REACT_APP_POSTHOG_KEY
const mixpanelKey = process.env.REACT_APP_MIXPANEL_KEY
const indicativeKey = import.meta.env.REACT_APP_INDICATIVE_KEY
const posthogKey = import.meta.env.REACT_APP_POSTHOG_KEY
const mixpanelKey = import.meta.env.REACT_APP_MIXPANEL_KEY

export const analyticsConfig: IAnalyticsConfig = {
google: { enabled: true },
Expand Down
8 changes: 4 additions & 4 deletions src/hooks/useWeb3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ type NetworkSettings = {
export function useNetwork(): NetworkSettings {
const [currentNetwork, rpcs] = useMemo(
() => [
process.env.REACT_APP_NETWORK || 'fuse',
import.meta.env.REACT_APP_NETWORK || 'fuse',
{
MAINNET_RPC:
process.env.REACT_APP_MAINNET_RPC ||
import.meta.env.REACT_APP_MAINNET_RPC ||
(ethers.getDefaultProvider('mainnet') as any).providerConfigs[0].provider.connection.url,
FUSE_RPC: process.env.REACT_APP_FUSE_RPC || 'https://rpc.fuse.io',
CELO_RPC: process.env.REACT_APP_CELO_RPC || 'https://forno.celo.org',
FUSE_RPC: import.meta.env.REACT_APP_FUSE_RPC || 'https://rpc.fuse.io',
CELO_RPC: import.meta.env.REACT_APP_CELO_RPC || 'https://forno.celo.org',
KOVAN_RPC: undefined,
ROPSTEN_RPC: undefined,
},
Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/af/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -2871,7 +2871,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr "Wat is 'n uittree-bydrae?"

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/ar/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -2871,7 +2871,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr "ما هي مساهمة الخروج؟"

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/ca/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -2871,7 +2871,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/cs/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -2871,7 +2871,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/da/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -2871,7 +2871,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/de/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -3211,7 +3211,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -3367,7 +3367,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr "Was ist ein Austrittsbeitrag?"

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/el/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -2871,7 +2871,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/en/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -3207,7 +3207,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -3363,7 +3363,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/es-AR/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -3193,7 +3193,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -3349,7 +3349,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr "¿Qué es una contribución de salida?"

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/es/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -3211,7 +3211,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -3367,7 +3367,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr "¿Qué es una contribución de salida?"

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/fi/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -2871,7 +2871,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/fr/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -3195,7 +3195,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -3351,7 +3351,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/he/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -3207,7 +3207,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -3363,7 +3363,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr "מהי תרומת יציאה?"

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/hi/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -2123,7 +2123,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/language/locales/hu/catalog.po
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@ msgstr ""
msgid "The total of your deposits which accumulates the rewards."
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:156
#: src/pages/gd/BuyGD/index.tsx:160
msgid "The widget in this page is a third-party service provided by Onramper. Please note that the verification of your transaction by Onramper may take up to 24 hours to complete. Following verification, it may take up to 3 business days for GoodDollars to be available in your wallet. In the event that the process takes longer, after receiving a confirmation email from your payment provider, please return to this screen to check the status of your transaction."
msgstr ""

Expand Down Expand Up @@ -2871,7 +2871,7 @@ msgstr ""
msgid "What's an exit contribution?"
msgstr ""

#: src/pages/gd/BuyGD/index.tsx:152
#: src/pages/gd/BuyGD/index.tsx:156
msgid "Why haven't my funds arrived yet?"
msgstr ""

Expand Down
Loading

1 comment on commit c3e7550

@vercel
Copy link

@vercel vercel bot commented on c3e7550 Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.