Skip to content

Commit

Permalink
update telegram integration component
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-torabiv committed Jan 9, 2025
1 parent f7383c4 commit 0963f38
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { StorageService } from '@/services/StorageService';
import { IntegrationPlatform } from '@/utils/enums';

import TcCommunityPlatformIcon from '../TcCommunityPlatformIcon';
import { isProduction } from '@/rainbowKitConfig';

interface TcTelegramIntegrationDialogProps {
isOpen: boolean;
Expand Down Expand Up @@ -166,32 +167,44 @@ const TcTelegramIntegrationDialog: React.FC<
<DialogContent>
<Stack spacing={2}>
<Stack spacing={1}>
<Alert severity='warning' sx={{ borderRadius: 1 }}>
<b>Note:</b> Activity in your telegram group will be analysed from
the moment you complete this setup. Previous activity can not be
analysed.
</Alert>
<Typography variant='body1' className='font-bold'>
Step 1: Add the bot
</Typography>
<Alert
severity='info'
sx={{
borderRadius: 1,
}}
>
To add the bot, you must have the <b>"Add New Admins"</b>{' '}
privilege.
</Alert>
<Stack pl={2}>
<ol className='list-decimal'>
<li>
Add <b className='text-secondary'>@TogetherCrewBot</b> to your
group or channel.
Add{' '}
<b className='text-secondary'>
{isProduction
? '@TogetherCrewBot'
: '@TogetherCrewStagingBot'}
</b>{' '}
to your telegram group or channel.
</li>
<li>
Enable <b>Admin Rights</b> and disable other privileges.
Find the bot in your list of members and right click then
select <b>promote to admin</b>, then remove all permissions.
</li>
<li>
Press <b>Add Bot as Admin</b> and confirm.
In the chat of your telegram group, copy the command below to
verify the bot.
</li>
</ol>
</Stack>
<Alert
severity='info'
sx={{
borderRadius: 1,
}}
>
<b>Note:</b> To add the bot, you must have the "Add New Admins"
privilege.
</Alert>
</Stack>
<Stack spacing={1}>
<Typography variant='body1' className='font-bold'>
Expand Down
2 changes: 1 addition & 1 deletion src/rainbowKitConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { http } from 'wagmi';

import { conf } from './configs';

const isProduction = conf.IS_MAINNET === 'true';
export const isProduction = conf.IS_MAINNET === 'true';

export const SUPPORTED_CHAINS: Chain[] = isProduction
? [arbitrum]
Expand Down

0 comments on commit 0963f38

Please sign in to comment.