Skip to content

Commit

Permalink
hotfix: default config values, don't show goodid details in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
L03TJ3 committed Oct 14, 2024
1 parent eb3ab7f commit 3f613bd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/common/buttons/ClaimButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ClaimButton = withStyles(getStylesFromProps)(({

const { goodWallet } = useContext(GoodWalletContext)
const payload = useFlagWithPayload('uat-goodid-flow')
const { whitelist } = payload
const { whitelist } = payload ?? {}

// if there's no status the first time then get it
// otherwise just return true.
Expand Down
13 changes: 10 additions & 3 deletions src/components/profile/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { GoodIdDetails, GoodIdProvider } from '@gooddollar/good-design'

import { createStackNavigator } from '../appNavigation/stackNavigation'
import { Section, Text, Wrapper } from '../common'
import Config from '../../config/config'
import { useFlagWithPayload } from '../../lib/hooks/useFeatureFlags'

import UserAvatar from '../common/view/UserAvatar'
import { withStyles } from '../../lib/styles'
Expand All @@ -29,6 +31,9 @@ const ProfileWrapper = ({ screenProps, styles }) => {
const userStorage = useUserStorage()
const goodWallet = useWallet()

const payload = useFlagWithPayload('uat-goodid-flow')
const { whitelist } = payload ?? {}

// const [faceRecordId, setRecordId] = useState()

const logMethod = userStorage?.userProperties.get('logMethod')
Expand Down Expand Up @@ -89,9 +94,11 @@ const ProfileWrapper = ({ screenProps, styles }) => {
{' '}
GoodID{' '}
</NText>
<GoodIdProvider>
<GoodIdDetails {...{ isVerified, account, onGoToClaim }} />
</GoodIdProvider>
{Config.env === 'development' || whitelist?.includes(account) ? (
<GoodIdProvider>
<GoodIdDetails {...{ isVerified, account, onGoToClaim }} />
</GoodIdProvider>
) : null}
</View>
</View>
</Section>
Expand Down
4 changes: 2 additions & 2 deletions src/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const goodIdExplorerUrls = {
CELO: env.REACT_APP_GOODID_CELO_EXPLORER ?? 'https://api.celoscan.io/api?apikey=WIX677MWRWNYWXTRCFKBK2NZAB2XHYBQ3K&',
FUSE: env.REACT_APP_GOODID_FUSE_EXPLORER ?? 'https://explorer.fuse.org/api?&',
MAINNET: env.REACT_APP_GOODID_MAINNET_EXPLORER ?? '',
GOODCOLLECTIVE: env.REACT_APP_GOOD_GOODCOLLECTIVE_EXPLORER
GOODCOLLECTIVE: env.REACT_APP_GOOD_GOODCOLLECTIVE_EXPLORER ?? ''
}

const ethereum = {
Expand Down Expand Up @@ -108,7 +108,7 @@ const ethereum = {
},
}

const UBIPoolAddresses = env.REACT_APP_UBIPOOL_ADDRESSES
const UBIPoolAddresses = env.REACT_APP_UBIPOOL_ADDRESSES ?? ''

const notifyOptsTest = {
notificationSchedule: 'minute', // repeat in each minute
Expand Down

0 comments on commit 3f613bd

Please sign in to comment.